diff --git a/indra/llmath/llrect.h b/indra/llmath/llrect.h
index 98aceb0597afb8894251d0146d2b04d4145e96c7..16bfdde658da8c515e44da1aea95a8dab94a8659 100644
--- a/indra/llmath/llrect.h
+++ b/indra/llmath/llrect.h
@@ -64,17 +64,11 @@ template <class Type> class LLRectBase
 	mLeft(left), mTop(top), mRight(right), mBottom(bottom)
 	{}
 
-	LLRectBase(const LLSD& sd)
+	explicit LLRectBase(const LLSD& sd)
 	{
 		setValue(sd);
 	}
 
-	const LLRectBase& operator=(const LLSD& sd)
-	{
-		setValue(sd);
-		return *this;
-	}
-
 	void setValue(const LLSD& sd)
 	{
 		mLeft = sd[0].asInteger(); 
diff --git a/indra/llmath/v3dmath.h b/indra/llmath/v3dmath.h
index a99bf5b4a6aa756866434ad147a5ae54c1914472..6ab31e8a41bdfc56df46d98d91ec2a70edae3a3f 100644
--- a/indra/llmath/v3dmath.h
+++ b/indra/llmath/v3dmath.h
@@ -53,7 +53,7 @@ class LLVector3d
 		inline LLVector3d(const F64 x, const F64 y, const F64 z);			// Initializes LLVector3d to (x. y, z)
 		inline explicit LLVector3d(const F64 *vec);				// Initializes LLVector3d to (vec[0]. vec[1], vec[2])
 		inline explicit LLVector3d(const LLVector3 &vec);
-		LLVector3d(const LLSD& sd)
+		explicit LLVector3d(const LLSD& sd)
 		{
 			setValue(sd);
 		}
@@ -65,12 +65,6 @@ class LLVector3d
 			mdV[2] = sd[2].asReal();
 		}
 
-		const LLVector3d& operator=(const LLSD& sd)
-		{
-			setValue(sd);
-			return *this;
-		}
-
 		LLSD getValue() const
 		{
 			LLSD ret;
diff --git a/indra/llmath/v3math.cpp b/indra/llmath/v3math.cpp
index 101e9d075a71b28ff885ac8612f484aa4ee9c086..f392ac448bac5b4d67a0250809dc2e0604387493 100644
--- a/indra/llmath/v3math.cpp
+++ b/indra/llmath/v3math.cpp
@@ -314,12 +314,6 @@ void LLVector3::setValue(const LLSD& sd)
 	mV[2] = (F32) sd[2].asReal();
 }
 
-const LLVector3& LLVector3::operator=(const LLSD& sd)
-{
-	setValue(sd);
-	return *this;
-}
-
 const LLVector3& operator*=(LLVector3 &a, const LLQuaternion &rot)
 {
     const F32 rw = - rot.mQ[VX] * a.mV[VX] - rot.mQ[VY] * a.mV[VY] - rot.mQ[VZ] * a.mV[VZ];
diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h
index 7f96800e210eeb5fbff4e98516dbb7a6eae5d03a..805d7e63842607e6ae5d616902969f0054444755 100644
--- a/indra/llmath/v3math.h
+++ b/indra/llmath/v3math.h
@@ -67,14 +67,12 @@ class LLVector3
 		explicit LLVector3(const LLVector2 &vec);				// Initializes LLVector3 to (vec[0]. vec[1], 0)
 		explicit LLVector3(const LLVector3d &vec);				// Initializes LLVector3 to (vec[0]. vec[1], vec[2])
 		explicit LLVector3(const LLVector4 &vec);				// Initializes LLVector4 to (vec[0]. vec[1], vec[2])
-		LLVector3(const LLSD& sd);
+		explicit LLVector3(const LLSD& sd);
 
 		LLSD getValue() const;
 
 		void setValue(const LLSD& sd);
 
-		const LLVector3& operator=(const LLSD& sd);
-
 		inline BOOL isFinite() const;									// checks to see if all values of LLVector3 are finite
 		BOOL		clamp(F32 min, F32 max);		// Clamps all values to (min,max), returns TRUE if data changed
 		BOOL		clampLength( F32 length_limit );					// Scales vector to limit length to a value
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index 7414c38847901b8650025fcfd97405ef42c910b1..d6fbdec61e16234bfb9536ea3de0c780a2635b39 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -58,7 +58,7 @@ class LLColor4
 		LLColor4(U32 clr);							// Initializes LLColor4 to (r=clr>>24, etc))
 		LLColor4(const F32 *vec);			// Initializes LLColor4 to (vec[0]. vec[1], vec[2], 1)
 		LLColor4(const LLColor3 &vec, F32 a = 1.f);	// Initializes LLColor4 to (vec, a)
-		LLColor4(const LLSD& sd);
+		explicit LLColor4(const LLSD& sd);
 		explicit LLColor4(const LLColor4U& color4u);  // "explicit" to avoid automatic conversion
 		explicit LLColor4(const LLVector4& vector4);  // "explicit" to avoid automatic conversion
 
@@ -113,7 +113,6 @@ class LLColor4
 		F32 &operator[](int idx) { return mV[idx]; }
 	
 	    const LLColor4& operator=(const LLColor3 &a);	// Assigns vec3 to vec4 and returns vec4
-		const LLColor4& operator=(const LLSD& sd);
 		
 		friend std::ostream&	 operator<<(std::ostream& s, const LLColor4 &a);		// Print a
 		friend LLColor4 operator+(const LLColor4 &a, const LLColor4 &b);	// Return vector a + b
@@ -634,12 +633,5 @@ void LLColor4::clamp()
 	}
 }
 
-inline const LLColor4& LLColor4::operator=(const LLSD& sd)
-{
-	setValue(sd);
-
-	return *this;
-}
-
 #endif
 
diff --git a/indra/llmath/v4coloru.h b/indra/llmath/v4coloru.h
index c0390fa0b2d364710a80245f291dd2069a46b226..4ec5a345ebc96a6d81e22db12e2e6913eb6ac229 100644
--- a/indra/llmath/v4coloru.h
+++ b/indra/llmath/v4coloru.h
@@ -66,7 +66,7 @@ class LLColor4U
 	LLColor4U(U8 r, U8 g, U8 b);		// Initializes LLColor4U to (r, g, b, 1)
 	LLColor4U(U8 r, U8 g, U8 b, U8 a);		// Initializes LLColor4U to (r. g, b, a)
 	LLColor4U(const U8 *vec);			// Initializes LLColor4U to (vec[0]. vec[1], vec[2], 1)
-	LLColor4U(const LLSD& sd)
+	explicit LLColor4U(const LLSD& sd)
 	{
 		setValue(sd);
 	}
@@ -79,12 +79,6 @@ class LLColor4U
 		mV[3] = sd[3].asInteger();
 	}
 
-	const LLColor4U& operator=(const LLSD& sd)
-	{
-		setValue(sd);
-		return *this;
-	}
-
 	LLSD getValue() const
 	{
 		LLSD ret;
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 110ad8276342c2c36f59fa860dbeff7ae23c31d4..4d340b3dddce17d376249e11804385f662ea73f4 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -146,7 +146,7 @@ LLButton::LLButton(const LLButton::Params& p)
 	mFadeWhenDisabled(FALSE)
 {
 	static LLUICachedControl<S32> llbutton_orig_h_pad ("UIButtonOrigHPad", 0);
-	static LLButton::Params default_params(LLUICtrlFactory::getDefaultParams<LLButton::Params>());
+	static Params default_params(LLUICtrlFactory::getDefaultParams<Params>());
 
 	//if we aren't a picture_style button set label as name if not provided
 	if (!p.picture_style.isProvided() || !p.picture_style)
diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h
index fe719e3b6a1be5dba4b7945c9eb01bd0125b616f..2f8f088a3e7a72de6c1725394f51ff706a840f19 100644
--- a/indra/llui/llcheckboxctrl.h
+++ b/indra/llui/llcheckboxctrl.h
@@ -65,7 +65,7 @@ class LLCheckBoxCtrl
 		Optional<LLTextBox::Params> label_text;
 		Optional<LLButton::Params> check_button;
 
-		Deprecated	radio_style;
+		Ignored					radio_style;
 
 		Params();
 	};
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 2197d5432be5363863ad005fa3983243a68a8526..51ab3326fe24c73493c81f8fcb474e854bcc2a4e 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -640,15 +640,17 @@ void LLComboBox::onButtonDown()
 {
 	if (!mList->getVisible())
 	{
+		// this might change selection, so do it first
+		prearrangeList();
+
+		// highlight the last selected item from the original selection before potentially selecting a new item
+		// as visual cue to original value of combo box
 		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));
 		}
 
-		prearrangeList();
-
 		if (mList->getItemCount() != 0)
 		{
 			showList();
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index a14b99eeb74bd1165e27b7bb82f422c2a25911a7..8932a7ccf2b542295e00048302b18cac39c30c0b 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -188,6 +188,13 @@ bool LLFloater::KeyCompare::equate(const LLSD& a, const LLSD& b)
 
 //************************************
 
+//static 
+const LLFloater::Params& LLFloater::getDefaultParams()
+{
+	return LLUICtrlFactory::getDefaultParams<LLFloater::Params>();
+}
+
+
 LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
 	:	LLPanel(),
 		mDragHandle(NULL),
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 421b7f3ec1b8e5bb44465b2ddb26574cdc63e8cb..3e80f1b28471d977d6d5ef04cd16a376483e24d9 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -141,7 +141,10 @@ friend class LLMultiFloater;
 		}
 	};
 	
-	LLFloater(const LLSD& key = LLSD(), const LLFloater::Params& params = LLFloater::Params());
+	// use this to avoid creating your own default LLFloater::Param instance
+	static const Params& getDefaultParams();
+
+	LLFloater(const LLSD& key = LLSD(), const Params& params = getDefaultParams());
 
 	virtual ~LLFloater();
 
diff --git a/indra/llui/llflyoutbutton.cpp b/indra/llui/llflyoutbutton.cpp
index 62a321dc02d605334b50abe67dd427a39a91fa35..8846f2a8c47ac1dc2e17a4c7f848aa2b629456fc 100644
--- a/indra/llui/llflyoutbutton.cpp
+++ b/indra/llui/llflyoutbutton.cpp
@@ -35,7 +35,7 @@
 // file includes
 #include "llflyoutbutton.h"
 
-static LLDefaultWidgetRegistry::Register<LLFlyoutButton> r2("flyout_button");
+//static LLDefaultWidgetRegistry::Register<LLFlyoutButton> r2("flyout_button");
 
 const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24;
 
diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h
index ad0f6f563f6424e2e3b4a0ee098edd209a236d38..a6cab0e9eec71285770fb35f4aa4cfb5502bf61a 100644
--- a/indra/llui/lliconctrl.h
+++ b/indra/llui/lliconctrl.h
@@ -55,7 +55,7 @@ class LLIconCtrl
 	{
 		Optional<LLUIImage*>	image;
 		Optional<LLUIColor>		color;
-		Deprecated				scale_image;
+		Ignored					scale_image;
 		Params();
 	};
 protected:
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index 78df7913341686f252a89e07342c3872f196c23c..eb021bace974318c4d674c7f1b2d17b4691d37ff 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -103,7 +103,7 @@ class LLLineEditor
 		Optional<S32>					text_pad_left,
 										text_pad_right;
 
-		Deprecated						is_unicode,
+		Ignored							is_unicode,
 										drop_shadow_visible,	
 										border_drop_shadow_visible,
 										bg_visible;
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 7d889c291cf8908c97651889607365e25b6fff8b..0d7d1ae746ee7912af4319a2f596b723764cd6a3 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -63,7 +63,7 @@ class LLMenuItemGL : public LLUICtrl
 		Optional<KEY>			jump_key;
 		Optional<bool>			use_mac_ctrl;
 
-		Deprecated				rect,
+		Ignored					rect,
 								left,
 								top,
 								right,
diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h
index ea8a9841e39a0e60a7b0ac102de6abf0b0882bda..7f4c1c040aadc8b25d018293ca56796aa2401a60 100644
--- a/indra/llui/llmultifloater.h
+++ b/indra/llui/llmultifloater.h
@@ -44,7 +44,7 @@
 class LLMultiFloater : public LLFloater
 {
 public:
-	LLMultiFloater(const LLFloater::Params& params = LLFloater::Params());
+	LLMultiFloater(const LLFloater::Params& params = LLFloater::getDefaultParams());
 	virtual ~LLMultiFloater() {};
 	
 	void buildTabContainer();
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 5c8d146e0cb20018e3e2dd9551684f57a45ead9f..b749724b4e93e64ae67c7a23c574d813873c4dc0 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -299,8 +299,8 @@ friend class LLNotifications;
 
 		struct Functor : public LLInitParam::Choice<Functor>
 		{
-			Option<std::string>										name;
-			Option<LLNotificationFunctorRegistry::ResponseFunctor>	function;
+			Alternative<std::string>										name;
+			Alternative<LLNotificationFunctorRegistry::ResponseFunctor>	function;
 
 			Functor()
 			:	name("functor_name"),
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index ad5cdca5cca03b5fcadc52bf709cc5d6779218e4..0136a41d61649bd9545e8fd51d0a4238f974bab4 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -58,6 +58,11 @@
 
 static LLDefaultWidgetRegistry::Register<LLPanel> r1("panel", &LLPanel::fromXML);
 
+const LLPanel::Params& LLPanel::getDefaultParams() 
+{ 
+	return LLUICtrlFactory::getDefaultParams<LLPanel::Params>(); 
+}
+
 LLPanel::Params::Params()
 :	has_border("border", false),
 	bg_opaque_color("bg_opaque_color"),
@@ -114,6 +119,14 @@ void LLPanel::addBorder(LLViewBorder::Params p)
 	addChild( mBorder );
 }
 
+void LLPanel::addBorder() 
+{  
+	LLViewBorder::Params p; 
+	p.border_thickness(LLPANEL_BORDER_WIDTH); 
+	addBorder(p); 
+}
+
+
 void LLPanel::removeBorder()
 {
 	if (mBorder)
@@ -885,10 +898,11 @@ LLView* LLPanel::getChildView(const std::string& name, BOOL recurse, BOOL create
 	}
 	if (!view && create_if_missing)
 	{
-		view = getDummyWidget<LLView>(name);
+		view = getDefaultWidget<LLView>(name);
 		if (!view)
 		{
-			view = LLUICtrlFactory::createDummyWidget<LLView>(name);
+			// create LLViews explicitly, as they are not registered widget types
+			view = LLUICtrlFactory::createDefaultWidget<LLView>(name);
 		}
 	}
 	return view;
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index b3ccdd0f00fccad6b9b5a15a31456586fbfba040..fc40cd77eb0c87bf774bbd68c2cfe3b546bdb719 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -96,10 +96,10 @@ class LLPanel : public LLUICtrl
 protected:
 	friend class LLUICtrlFactory;
 	// 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>(); }
+	static const LLPanel::Params& getDefaultParams();
 
 	// Panels can get constructed directly
-	LLPanel(const Params& params = defaultParams());
+	LLPanel(const LLPanel::Params& params = getDefaultParams());
 	
 public:
 // 	LLPanel(const std::string& name, const LLRect& rect = LLRect(), BOOL bordered = TRUE);
@@ -122,7 +122,7 @@ class LLPanel : public LLUICtrl
 
 	// Border controls
 	void addBorder( LLViewBorder::Params p);
-	void addBorder() {  LLViewBorder::Params p; p.border_thickness(LLPANEL_BORDER_WIDTH); addBorder(p); }
+	void addBorder();
 	void			removeBorder();
 	BOOL			hasBorder() const { return mBorder != NULL; }
 	void			setBorderVisible( BOOL b );
diff --git a/indra/llui/llradiogroup.h b/indra/llui/llradiogroup.h
index d3cb8a628e9d15d8653574aa8a460a63535e6136..850d896e29edc318c0f8270531d4fff8ab043c59 100644
--- a/indra/llui/llradiogroup.h
+++ b/indra/llui/llradiogroup.h
@@ -48,8 +48,8 @@ class LLRadioCtrl : public LLCheckBoxCtrl
 public:
 	struct Params : public LLInitParam::Block<Params, LLCheckBoxCtrl::Params>
 	{
-		Deprecated length;
-		Deprecated type;
+		Ignored		length;
+		Ignored		type;
 
 		Params() 
 		:	length("length"),
diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp
index 48fddbfb717d465c0cee46915f4e68cdc31eb80d..02f09bd9b4bd546f0d5f58b5b1d5a54f1e99df83 100644
--- a/indra/llui/llscrolllistcolumn.cpp
+++ b/indra/llui/llscrolllistcolumn.cpp
@@ -285,6 +285,16 @@ void LLScrollListColumn::SortNames::declareValues()
 	declare("descending", LLScrollListColumn::DESCENDING);
 }
 
+//
+// LLScrollListColumn
+//
+//static 
+const LLScrollListColumn::Params& LLScrollListColumn::getDefaultParams()
+{
+	return LLUICtrlFactory::getDefaultParams<LLScrollListColumn::Params>();
+}
+
+
 LLScrollListColumn::LLScrollListColumn(const Params& p, LLScrollListCtrl* parent)
 :	mWidth(0),
 	mIndex (-1),
diff --git a/indra/llui/llscrolllistcolumn.h b/indra/llui/llscrolllistcolumn.h
index c1bb86577f667ea6e85c92ce06b7248205eec12b..712ea564548fdd8f8e5da0652462225a6a9d12b8 100644
--- a/indra/llui/llscrolllistcolumn.h
+++ b/indra/llui/llscrolllistcolumn.h
@@ -116,9 +116,9 @@ class LLScrollListColumn
 
 		struct Width : public LLInitParam::Choice<Width>
 		{
-			Option<bool>	dynamic_width;
-			Option<S32>		pixel_width;
-			Option<F32>		relative_width;
+			Alternative<bool>	dynamic_width;
+			Alternative<S32>		pixel_width;
+			Alternative<F32>		relative_width;
 
 			Width()
 			:	dynamic_width("dynamicwidth", false),
@@ -133,8 +133,8 @@ class LLScrollListColumn
 		// either an image or label is used in column header
 		struct Header : public LLInitParam::Choice<Header>
 		{
-			Option<std::string>			label;
-			Option<LLUIImage*>			image;
+			Alternative<std::string>			label;
+			Alternative<LLUIImage*>			image;
 
 			Header()
 			:	label("label"),
@@ -160,8 +160,10 @@ class LLScrollListColumn
 		}
 	};
 
+	static const Params& getDefaultParams();
+
 	//NOTE: this is default constructible so we can store it in a map.
-	LLScrollListColumn(const Params& p = Params(), LLScrollListCtrl* = NULL);
+	LLScrollListColumn(const Params& p = getDefaultParams(), LLScrollListCtrl* = NULL);
 
 	void setWidth(S32 width);
 	S32 getWidth() const { return mWidth; }
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 42c7c892c86a30e6683ad8991418f5088ecac107..6d91c784f745a0a1f7f6cf927e8d787fd3000d01 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1246,14 +1246,14 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const
 // "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* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, BOOL enabled, S32 column_width)
+LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos, BOOL enabled)
 {
 	if (getItemCount() < mMaxItemCount)
 	{
 		LLScrollListItem::Params item_p;
 		item_p.enabled(enabled);
 		item_p.value(id);
-		item_p.cells.add().value(item_text).width(column_width).type("text");
+		item_p.cells.add().value(item_text).type("text");
 
 		return addRow( item_p, pos );
 	}
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 461df6760fa49ad42ef63039e85b4b8a0be72220..8d200fb73fc80f9287f8de809f17a6640c8bf6ad 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -222,7 +222,7 @@ class LLScrollListCtrl : public LLUICtrl, public LLEditMenuHandler,
 	// 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);
+	LLScrollListItem*	addStringUUIDItem(const std::string& item_text, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE);
 	LLUUID				getStringUUIDSelectedItem() const;
 
 	LLScrollListItem*	getFirstSelected() const;
diff --git a/indra/llui/llscrolllistitem.h b/indra/llui/llscrolllistitem.h
index 8d87137c3a2c043b1785300a50f730fd03589bad..4237d5b304eabf0e6a84e56b2b1339e4fac55415 100644
--- a/indra/llui/llscrolllistitem.h
+++ b/indra/llui/llscrolllistitem.h
@@ -64,9 +64,9 @@ class LLScrollListItem
 		Optional<void*>		userdata;
 		Optional<LLSD>		value;
 		
-		Deprecated			name; // use for localization tools
-		Deprecated			type; 
-		Deprecated			length; 
+		Ignored				name; // use for localization tools
+		Ignored				type; 
+		Ignored				length; 
 
 		Multiple<LLScrollListCell::Params> cells;
 
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp
index 3171f96fcf0350b93180d46e8f1d7238d7f7e09c..9522d32a8bba723b896a1d49cb5439e8c7cb2934 100644
--- a/indra/llui/llsearcheditor.cpp
+++ b/indra/llui/llsearcheditor.cpp
@@ -36,7 +36,7 @@
  
 #include "llsearcheditor.h"
 
-static LLDefaultWidgetRegistry::Register<LLSearchEditor> r2("search_editor");
+//static LLDefaultWidgetRegistry::Register<LLSearchEditor> r2("search_editor");
 
 LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
 :	LLUICtrl(p)
diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h
index aae538a2212f926a5c136e1571d07b6da136f4db..dca906decc8ec88279f45ccfba4f596d99da6811 100644
--- a/indra/llui/lltextbox.h
+++ b/indra/llui/lltextbox.h
@@ -60,7 +60,7 @@ class LLTextBox
 
 		Optional<LLFontGL::ShadowType>	font_shadow;
 
-		Deprecated			drop_shadow_visible,
+		Ignored				drop_shadow_visible,
 							type,
 							length;
 
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index efedb30f4718d30b2e0231b3a98a40da3569efe7..f64353555e0d6010a26dcb7a17e3fcc0295eb0df 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -82,7 +82,7 @@ class LLTextEditor : public LLUICtrl, LLEditMenuHandler, protected LLPreeditor
 
 		Optional<LLViewBorder::Params> border;
 
-		Deprecated				type,
+		Ignored					type,
 								length,
 								is_unicode;
 
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 3c9759695d9013e0b4ebb8f31522e6315f0d7c64..1d3e5d7a15b924209e9a7ea4d58a92116a779335 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -58,6 +58,10 @@
 #include "llmenugl.h"
 #include "llwindow.h"
 
+// for registration
+#include "llsearcheditor.h"
+#include "llflyoutbutton.h"
+
 // for XUIParse
 #include "llquaternion.h"
 #include <boost/tokenizer.hpp>
@@ -85,6 +89,10 @@ std::list<std::string> gUntranslated;
 
 /*static*/ std::vector<std::string> LLUI::sXUIPaths;
 
+// register searcheditor here
+static LLDefaultWidgetRegistry::Register<LLSearchEditor> register_search_editor("search_editor");
+static LLDefaultWidgetRegistry::Register<LLFlyoutButton> register_flyout_button("flyout_button");
+
 
 //
 // Functions
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index 35c0bb478ebf8bfbf2fbaf2bca732fd7d7edefdc..dbd295d4e86012e7dd382d93c8fb5f28273a8081 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -665,8 +665,8 @@ template <typename T> LLRegisterWith<LLDestroyClassList> LLDestroyClass<T>::sReg
 // useful parameter blocks
 struct TimeIntervalParam : public LLInitParam::Choice<TimeIntervalParam>
 {
-	Option<F32>		seconds;
-	Option<S32>		frames;
+	Alternative<F32>		seconds;
+	Alternative<S32>		frames;
 	TimeIntervalParam()
 	:	seconds("seconds"),
 		frames("frames")
diff --git a/indra/llui/lluicolortable.h b/indra/llui/lluicolortable.h
index 89008758135a3a01b8d7e338e2e05b4328ef5404..dcbb1ee5cb6e45bd23912452ca71b929c6fff60e 100644
--- a/indra/llui/lluicolortable.h
+++ b/indra/llui/lluicolortable.h
@@ -22,8 +22,8 @@ class LLUIColorTable : public LLSingleton<LLUIColorTable>
 public:
 	struct ColorParams : LLInitParam::Choice<ColorParams>
 	{
-		Option<LLColor4>    value;
-		Option<std::string> reference;
+		Alternative<LLColor4>    value;
+		Alternative<std::string> reference;
 
 		ColorParams();
 	};
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 80ef7ebdf12d8da3264e710a3a1787ec21f3de3d..8aba122e39c276124732c7f3501cf2f3b56877bd 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -111,6 +111,13 @@ void LLFocusableElement::setFocus(BOOL b)
 {
 }
 
+//static 
+const LLUICtrl::Params& LLUICtrl::getDefaultParams()
+{
+	return LLUICtrlFactory::getDefaultParams<LLUICtrl::Params>();
+}
+
+
 LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel) 
 :	LLView(p),
 	mTentative(FALSE),
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index 71f0a47f45b81577e015ebbd1e55673bd2eda3ea..686f1e966d98e93b97d8ea7774fa0747fac6058b 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -87,7 +87,7 @@ class LLUICtrl
 	
 	struct CallbackParam : public LLInitParam::Block<CallbackParam>
 	{
-		Deprecated				name;
+		Ignored					name;
 
 		Optional<std::string>	function_name;
 		Optional<LLSD>			parameter;
@@ -116,8 +116,8 @@ class LLUICtrl
 	
 	struct EnableControls : public LLInitParam::Choice<EnableControls>
 	{
-		Option<std::string> enabled;
-		Option<std::string> disabled;
+		Alternative<std::string> enabled;
+		Alternative<std::string> disabled;
 		
 		EnableControls()
 		: enabled("enabled_control"),
@@ -126,8 +126,8 @@ class LLUICtrl
 	};	
 	struct ControlVisibility : public LLInitParam::Choice<ControlVisibility>
 	{
-		Option<std::string> visible;
-		Option<std::string> invisible;
+		Alternative<std::string> visible;
+		Alternative<std::string> invisible;
 
 		ControlVisibility()
 			: visible("make_visible_control"),
@@ -160,7 +160,8 @@ class LLUICtrl
 	void initFromParams(const Params& p);
 protected:
 	friend class LLUICtrlFactory;
-	LLUICtrl(const Params& p = LLUICtrl::Params(),
+	static const Params& getDefaultParams();
+	LLUICtrl(const Params& p = getDefaultParams(),
              const LLViewModelPtr& viewmodel=LLViewModelPtr(new LLViewModel));
 	
 	void initCommitCallback(const CommitCallbackParam& cb, commit_signal_t& sig);
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 4045022c8e568ad9ae335d5b3240e42157b43af8..b9c61b1fed4c5b4d0c1c2684587b751e07bada74 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -154,9 +154,15 @@ struct LLCompareTypeID
 
 class LLWidgetTemplateRegistry 
 :	public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetTemplateRegistry, LLCompareTypeID>
-{
+{};
 
-};
+// function used to create new default widgets via LLView::getChild<T>
+typedef LLView* (*dummy_widget_creator_func_t)(const std::string&);
+
+// used to register factory functions for default widget instances
+class LLDummyWidgetRegistry
+:	public LLRegistrySingleton<const std::type_info*, dummy_widget_creator_func_t, LLDummyWidgetRegistry, LLCompareTypeID>
+{};
 
 extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP;
 extern LLFastTimer::DeclareTimer FTM_WIDGET_CONSTRUCTION;
@@ -295,10 +301,16 @@ class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
 		return widget;
 	}
 
+	template<class T>
+	static T* getDefaultWidget(const std::string& name)
+	{
+		dummy_widget_creator_func_t* dummy_func = LLDummyWidgetRegistry::instance().getValue(&typeid(T));
+		return dynamic_cast<T*>((*dummy_func)(name));
+	}
+
 	template <class T> 
-	static T* createDummyWidget(const std::string& name) 
+	static LLView* createDefaultWidget(const std::string& name) 
 	{
-		//#pragma message("Generating LLUICtrlFactory::createDummyWidget")
 		typename T::Params params;
 		params.name(name);
 		
@@ -389,8 +401,10 @@ template<typename T, typename PARAM_BLOCK>
 LLWidgetRegistry<DERIVED>::Register<T, PARAM_BLOCK>::Register(const char* tag, LLWidgetCreatorFunc func)
 :	LLWidgetRegistry<DERIVED>::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...:(
+	// associate parameter block type with template .xml file
 	LLWidgetTemplateRegistry::instance().defaultRegistrar().add(&typeid(PARAM_BLOCK), tag);
+	// associate widget type with factory function
+	LLDummyWidgetRegistry::instance().defaultRegistrar().add(&typeid(T), &LLUICtrlFactory::createDefaultWidget<T>);
 }
 
 
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 2e2ef4d79f52519f4360b03e7b8609594ba5dd8e..d225ad276797e640193edcd67315a970ebce691e 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -124,7 +124,7 @@ LLView::LLView(const LLView::Params& p)
 	mDefaultTabGroup(p.default_tab_group),
 	mLastTabGroup(0),
 	mToolTipMsg((LLStringExplicit)p.tool_tip()),
-	mDummyWidgets(NULL)
+	mDefaultWidgets(NULL)
 {
 	// create rect first, as this will supply initial follows flags
 	setShape(p.rect);
@@ -157,12 +157,12 @@ LLView::~LLView()
 		mParentView->removeChild(this);
 	}
 
-	if (mDummyWidgets)
+	if (mDefaultWidgets)
 	{
-		std::for_each(mDummyWidgets->begin(), mDummyWidgets->end(),
+		std::for_each(mDefaultWidgets->begin(), mDefaultWidgets->end(),
 					  DeletePairedPointer());
-		delete mDummyWidgets;
-		mDummyWidgets = NULL;
+		delete mDefaultWidgets;
+		mDefaultWidgets = NULL;
 	}
 }
 
@@ -1710,10 +1710,10 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse, BOOL create_
 
 	if (create_if_missing)
 	{
-		LLView* view = getDummyWidget<LLView>(name);
+		LLView* view = getDefaultWidget<LLView>(name);
 		if (!view)
 		{
-			 view = LLUICtrlFactory::createDummyWidget<LLView>(name);
+			 view = LLUICtrlFactory::createDefaultWidget<LLView>(name);
 		}
 		return view;
 	}
@@ -2750,11 +2750,11 @@ LLView::tree_iterator_t LLView::endTree()
 
 // only create maps on demand, as they incur heap allocation/deallocation cost
 // when a view is constructed/deconstructed
-LLView::dummy_widget_map_t& LLView::getDummyWidgetMap() const
+LLView::default_widget_map_t& LLView::getDefaultWidgetMap() const
 {
-	if (!mDummyWidgets)
+	if (!mDefaultWidgets)
 	{
-		mDummyWidgets = new dummy_widget_map_t();
+		mDefaultWidgets = new default_widget_map_t();
 	}
-	return *mDummyWidgets;
+	return *mDefaultWidgets;
 }
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 458d02d001b7e4782063428de773e04d97b760d4..422f62f602437a678a9adf622381e1a2b715e9e7 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -143,8 +143,8 @@ class LLView : public LLMouseHandler, public LLMortician
 public:
 	struct Follows : public LLInitParam::Choice<Follows>
 	{
-		Option<std::string>	string;
-		Option<U32>			flags;
+		Alternative<std::string>	string;
+		Alternative<U32>			flags;
 
         Follows()
 		:   string(""),
@@ -190,7 +190,7 @@ class LLView : public LLMouseHandler, public LLMortician
 
 		// these are nested attributes for LLLayoutPanel
 		//FIXME: get parent context involved in parsing traversal
-		Deprecated					user_resize,
+		Ignored						user_resize,
 									auto_resize,
 									needs_translate;
 
@@ -486,10 +486,10 @@ class LLView : public LLMouseHandler, public LLMortician
 
 	virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
 
-	template <class T> T* getDummyWidget(const std::string& name) const
+	template <class T> T* getDefaultWidget(const std::string& name) const
 	{
-		dummy_widget_map_t::const_iterator found_it = getDummyWidgetMap().find(name);
-		if (found_it == getDummyWidgetMap().end())
+		default_widget_map_t::const_iterator found_it = getDefaultWidgetMap().find(name);
+		if (found_it == getDefaultWidgetMap().end())
 		{
 			return NULL;
 		}
@@ -592,11 +592,11 @@ class LLView : public LLMouseHandler, public LLMortician
 
 	static LLWindow* sWindow;	// All root views must know about their window.
 
-	typedef std::map<std::string, LLView*> dummy_widget_map_t;
+	typedef std::map<std::string, LLView*> default_widget_map_t;
 	// allocate this map no demand, as it is rarely needed
-	mutable dummy_widget_map_t* mDummyWidgets;
+	mutable default_widget_map_t* mDefaultWidgets;
 
-	dummy_widget_map_t& getDummyWidgetMap() const;
+	default_widget_map_t& getDefaultWidgetMap() const;
 
 public:
 	static BOOL	sDebugRects;	// Draw debug rects behind everything.
@@ -640,10 +640,10 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse, BO
 		}
 		if (create_if_missing)
 		{
-			result = getDummyWidget<T>(name);
+			result = getDefaultWidget<T>(name);
 			if (!result)
 			{
-				result = LLUICtrlFactory::createDummyWidget<T>(name);
+				result = LLUICtrlFactory::getDefaultWidget<T>(name);
 
 				if (result)
 				{
@@ -655,7 +655,7 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse, BO
 					return NULL;
 				}
 
-				getDummyWidgetMap()[name] = result;
+				getDefaultWidgetMap()[name] = result;
 			}
 		}
 	}
diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp
index 2271c02cd040e6b2405832ff3d27ec15fb47dafc..9d0cdacb1d465389ab158e4bede46f7df73c06c0 100644
--- a/indra/llxml/llcontrol.cpp
+++ b/indra/llxml/llcontrol.cpp
@@ -1176,7 +1176,7 @@ template<>
 LLVector3 convert_from_llsd<LLVector3>(const LLSD& sd, eControlType type, const std::string& control_name)
 {
 	if (type == TYPE_VEC3)
-		return sd;
+		return (LLVector3)sd;
 	else
 	{
 		CONTROL_ERRS << "Invalid LLVector3 value" << llendl;
@@ -1188,7 +1188,7 @@ template<>
 LLVector3d convert_from_llsd<LLVector3d>(const LLSD& sd, eControlType type, const std::string& control_name)
 {
 	if (type == TYPE_VEC3D)
-		return sd;
+		return (LLVector3d)sd;
 	else
 	{
 		CONTROL_ERRS << "Invalid LLVector3d value" << llendl;
@@ -1200,7 +1200,7 @@ template<>
 LLRect convert_from_llsd<LLRect>(const LLSD& sd, eControlType type, const std::string& control_name)
 {
 	if (type == TYPE_RECT)
-		return sd;
+		return LLRect(sd);
 	else
 	{
 		CONTROL_ERRS << "Invalid rect value" << llendl;
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 0cbacd5b2ecda095bb9d1559b8329fa80355dcee..f96c8fdca048c8f233967af7b6ae986bcc71b8d7 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -278,7 +278,6 @@ set(viewer_SOURCE_FILES
     llpaneldirland.cpp
     llpaneldirpeople.cpp
     llpaneldirplaces.cpp
-    llpaneldisplay.cpp
     llpanelevent.cpp
     llpanelface.cpp
     llpanelgroup.cpp
@@ -694,7 +693,6 @@ set(viewer_HEADER_FILES
     llpaneldirland.h
     llpaneldirpeople.h
     llpaneldirplaces.h
-    llpaneldisplay.h
     llpanelevent.h
     llpanelface.h
     llpanelgroup.h
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index ce66bb61808f0d3447a27ccc04b4cfb435c61126..d0d6a118b3929d4715186c1b7ab9ed17ee395143 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1715,7 +1715,7 @@ void LLAppViewer::loadColorSettings()
 			if(control->isType(TYPE_COL4))
 			{
 				LLUIColorTable::ColorParams color;
-				color.value = control->getValue();
+				color.value = (LLColor4)control->getValue();
 
 				LLUIColorTable::ColorEntryParams color_entry;
 				color_entry.name = name;
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 7719af2bd719e2ca957829a947652de35c6d3fbe..0e5b943dd3633542e7c4fe83920b17256ed6feed 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -367,7 +367,7 @@ BOOL LLFavoritesBarCtrl::postBuild()
 	LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_favorites.xml", gMenuHolder);
 	if (!menu)
 	{
-		menu = LLUICtrlFactory::createDummyWidget<LLMenuGL>("inventory_menu");
+		menu = LLUICtrlFactory::getDefaultWidget<LLMenuGL>("inventory_menu");
 	}
 	menu->setBackgroundColor(gSavedSkinSettings.getColor("MenuPopupBgColor"));
 	mInventoryItemsPopupMenuHandle = menu->getHandle();
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index e1974bba84ce000800bccfe885fc5adb080193bf..8ad5a19d02c2f1a9625c09778bd10e48edc89a72 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -75,7 +75,9 @@ LLFloaterAuction::LLFloaterAuction(const LLSD& key)
   : LLFloater(),
 	mParcelID(-1)
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml");
+//	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml");
+	mCommitCallbackRegistrar.add("ClickSnapshot",	boost::bind(&LLFloaterAuction::onClickSnapshot, this));
+	mCommitCallbackRegistrar.add("ClickOK",		boost::bind(&LLFloaterAuction::onClickOK, this));
 }
 
 // Destroys the object
@@ -85,11 +87,6 @@ LLFloaterAuction::~LLFloaterAuction()
 
 BOOL LLFloaterAuction::postBuild()
 {
-	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;
 }
 
diff --git a/indra/newview/llfloaterauction.h b/indra/newview/llfloaterauction.h
index d71fd3c653e90500e5c74dbacc446b761ef173a7..b018316c64d5063f8795e3fc1214822e6c9ef408 100644
--- a/indra/newview/llfloaterauction.h
+++ b/indra/newview/llfloaterauction.h
@@ -55,9 +55,9 @@ class LLFloaterAuction : public LLFloater, public LLFloaterSingleton<LLFloaterAu
 	/*virtual*/ void onOpen(const LLSD& key);
 	/*virtual*/ void draw();
 	
-private:
 	LLFloaterAuction(const LLSD& key);
 	~LLFloaterAuction();
+private:
 	void initialize();
 
 	static void onClickSnapshot(void* data);
diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp
index 2507a72caa8a546a04dc608b3586a1c9142c55ce..9dbd1db38e9a1f2e7c7a3f803adfedbc7446a9c5 100644
--- a/indra/newview/llfloaterbuildoptions.cpp
+++ b/indra/newview/llfloaterbuildoptions.cpp
@@ -46,7 +46,7 @@
 LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key)
   : LLFloater()
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_build_options.xml");
+	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_build_options.xml");
 }
 
 LLFloaterBuildOptions::~LLFloaterBuildOptions()
diff --git a/indra/newview/llfloaterbuildoptions.h b/indra/newview/llfloaterbuildoptions.h
index da72520486b5a59ed45b3de881715fbcfb332897..61db303ba2303f645d215a348da1f904dfdf92a8 100644
--- a/indra/newview/llfloaterbuildoptions.h
+++ b/indra/newview/llfloaterbuildoptions.h
@@ -45,7 +45,7 @@ class LLFloaterBuildOptions
 	:	public LLFloater, public LLFloaterSingleton<LLFloaterBuildOptions>
 {
 	friend class LLUISingleton<LLFloaterBuildOptions, VisibilityPolicy<LLFloater> >;
-protected:
+public:
 	LLFloaterBuildOptions(const LLSD& key);
 	~LLFloaterBuildOptions();
 };
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index 5cf4d90ece99b8656bffa63b49ce372ddb23cbd3..e4e1c7efa2ce9ab9b5ad6de69629c81c5dd42c59 100644
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -50,7 +50,7 @@
 LLFloaterBump::LLFloaterBump(const LLSD& key) 
 :	LLFloater()
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_bumps.xml");
+	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_bumps.xml");
 }
 
 
diff --git a/indra/newview/llfloaterbump.h b/indra/newview/llfloaterbump.h
index f55a9e6bc527dbd53c9aa31b128d15ef4272d8fe..b56817436c8ba21ba6746e739d79beb3f7b6b47c 100644
--- a/indra/newview/llfloaterbump.h
+++ b/indra/newview/llfloaterbump.h
@@ -44,13 +44,12 @@ class LLFloaterBump
 {
 	friend class LLUISingleton<LLFloaterBump, VisibilityPolicy<LLFloater> >;
 protected:
-	LLFloaterBump(const LLSD& key);
-	virtual ~LLFloaterBump();
-	
 	void add(LLScrollListCtrl* list, LLMeanCollisionData *mcd);
 
 public:
 	/*virtual*/ void onOpen(const LLSD& key);
+	LLFloaterBump(const LLSD& key);
+	virtual ~LLFloaterBump();
 };
 
 #endif
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 6ca8944a19d6396bd3b340485b0634eb2ccc5c65..e79142513ba9548abe904fe2af1ac039fc829ccc 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -47,20 +47,24 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f;
 //
 // Member functions
 //
-
-
 LLFloaterCamera::LLFloaterCamera(const LLSD& val)
 :	LLFloater()
 {
-	setIsChrome(TRUE);
-	
 	// For now, only used for size and tooltip strings
 	const BOOL DONT_OPEN = FALSE;
 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", DONT_OPEN);
-	
+}
+
+// virtual
+BOOL LLFloaterCamera::postBuild()
+{
+	setIsChrome(TRUE);
+
 	mRotate = getChild<LLJoystickCameraRotate>("cam_rotate_stick");
 	mZoom = getChild<LLJoystickCameraZoom>("zoom");
 	mTrack = getChild<LLJoystickCameraTrack>("cam_track_stick");
+
+	return TRUE;
 }
 
 // virtual
@@ -79,3 +83,4 @@ void LLFloaterCamera::onClose(bool app_quitting)
 		gSavedSettings.setBOOL("ShowCameraControls", FALSE);
 	}
 }
+
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index 871e5c8ed13f501566389187b8de080168604665..f954e329eba751ce68c3588041d03a8ac278169b 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -51,7 +51,7 @@ class LLFloaterCamera
 	
 	/*virtual*/ void onOpen(const LLSD& key);
 	/*virtual*/ void onClose(bool app_quitting);
-	
+	/*virtual*/ BOOL postBuild();
 public:
 	LLJoystickCameraRotate* mRotate;
 	LLJoystickCameraZoom*	mZoom;
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index a97b270c4423dcaf2971f379d32f2957f8a97a58..82deaef4a9bc86026e34ae262a4f6d6f17655e20 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -53,21 +53,22 @@ const std::string LAG_GOOD_IMAGE_NAME     = "lag_status_good.tga";
 LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
 	:	LLFloater()
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml");
+//	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml");
+	mCommitCallbackRegistrar.add("LagMeter.ClickShrink",  boost::bind(&LLFloaterLagMeter::onClickShrink, this));	
+}
 
+BOOL LLFloaterLagMeter::postBuild()
+{
 	// Don't let this window take keyboard focus -- it's confusing to
 	// lose arrow-key driving when testing lag.
 	setIsChrome(TRUE);
-
+	
 	// were we shrunk last time?
 	if (gSavedSettings.getBOOL("LagMeterShrunk"))
 	{
-		onClickShrink(this);
+		onClickShrink();
 	}
-}
-
-BOOL LLFloaterLagMeter::postBuild()
-{
+	
 	mClientButton = getChild<LLButton>("client_lagmeter");
 	mClientText = getChild<LLTextBox>("client_text");
 	mClientCause = getChild<LLTextBox>("client_lag_cause");
@@ -102,7 +103,7 @@ BOOL LLFloaterLagMeter::postBuild()
 	config_string = getString("server_single_process_max_time_ms", mStringArgs);
 	mServerSingleProcessMaxTime = (float)atof( config_string.c_str() );
 
-	mShrunk = false;
+//	mShrunk = false;
 	config_string = getString("max_width_px", mStringArgs);
 	mMaxWidth = atoi( config_string.c_str() );
 	config_string = getString("min_width_px", mStringArgs);
@@ -120,18 +121,18 @@ BOOL LLFloaterLagMeter::postBuild()
 	mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps");
 	mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps");
 
-	childSetAction("minimize", onClickShrink, this);
+//	childSetAction("minimize", onClickShrink, this);
 
 	return TRUE;
 }
 LLFloaterLagMeter::~LLFloaterLagMeter()
 {
 	// save shrunk status for next time
-	gSavedSettings.setBOOL("LagMeterShrunk", mShrunk);
+//	gSavedSettings.setBOOL("LagMeterShrunk", mShrunk);
 	// expand so we save the large window rectangle
-	if (mShrunk)
+	if (gSavedSettings.getBOOL("LagMeterShrunk"))
 	{
-		onClickShrink(this);
+		onClickShrink();
 	}
 }
 
@@ -311,58 +312,61 @@ void LLFloaterLagMeter::determineServer()
 	}
 }
 
-//static
-void LLFloaterLagMeter::onClickShrink(void * data)
+
+void LLFloaterLagMeter::onClickShrink()  // toggle "LagMeterShrunk"
 {
-	LLFloaterLagMeter * self = (LLFloaterLagMeter*)data;
+//	LLFloaterLagMeter * self = (LLFloaterLagMeter*)data;
+
+	LLButton * button = getChild<LLButton>("minimize");
+	S32 delta_width = mMaxWidth -mMinWidth;
+	LLRect r = getRect();
+	bool shrunk = gSavedSettings.getBOOL("LagMeterShrunk");
 
-	LLButton * button = self->getChild<LLButton>("minimize");
-	S32 delta_width = self->mMaxWidth - self->mMinWidth;
-	LLRect r = self->getRect();
-	if(self->mShrunk)
+	if(shrunk)
 	{
-		self->setTitle( self->getString("max_title_msg", self->mStringArgs) );
+		setTitle(getString("max_title_msg", mStringArgs) );
 		// make left edge appear to expand
 		r.translate(-delta_width, 0);
-		self->setRect(r);
-		self->reshape(self->mMaxWidth, self->getRect().getHeight());
+		setRect(r);
+		reshape(mMaxWidth, getRect().getHeight());
 		
-		self->childSetText("client", self->getString("client_text_msg", self->mStringArgs) + ":");
-		self->childSetText("network", self->getString("network_text_msg", self->mStringArgs) + ":");
-		self->childSetText("server", self->getString("server_text_msg", self->mStringArgs) + ":");
+		childSetText("client", getString("client_text_msg", mStringArgs) + ":");
+		childSetText("network", getString("network_text_msg",mStringArgs) + ":");
+		childSetText("server", getString("server_text_msg", mStringArgs) + ":");
 
 		// usually "<<"
-		button->setLabel( self->getString("smaller_label", self->mStringArgs) );
+		button->setLabel( getString("smaller_label", mStringArgs) );
 	}
 	else
 	{
-		self->setTitle( self->getString("min_title_msg", self->mStringArgs) );
+		setTitle( getString("min_title_msg", mStringArgs) );
 		// make left edge appear to collapse
 		r.translate(delta_width, 0);
-		self->setRect(r);
-		self->reshape(self->mMinWidth, self->getRect().getHeight());
+		setRect(r);
+		reshape(mMinWidth, getRect().getHeight());
 		
-		self->childSetText("client", self->getString("client_text_msg", self->mStringArgs) );
-		self->childSetText("network", self->getString("network_text_msg", self->mStringArgs) );
-		self->childSetText("server", self->getString("server_text_msg", self->mStringArgs) );
+		childSetText("client", getString("client_text_msg", mStringArgs) );
+		childSetText("network",getString("network_text_msg",mStringArgs) );
+		childSetText("server", getString("server_text_msg", mStringArgs) );
 
 		// usually ">>"
-		button->setLabel( self->getString("bigger_label", self->mStringArgs) );
+		button->setLabel( getString("bigger_label", mStringArgs) );
 	}
 	// Don't put keyboard focus on the button
 	button->setFocus(FALSE);
 
-	self->mClientText->setVisible(self->mShrunk);
-	self->mClientCause->setVisible(self->mShrunk);
-	self->childSetVisible("client_help", self->mShrunk);
+//	self->mClientText->setVisible(self->mShrunk);
+//	self->mClientCause->setVisible(self->mShrunk);
+//	self->childSetVisible("client_help", self->mShrunk);
 
-	self->mNetworkText->setVisible(self->mShrunk);
-	self->mNetworkCause->setVisible(self->mShrunk);
-	self->childSetVisible("network_help", self->mShrunk);
+//	self->mNetworkText->setVisible(self->mShrunk);
+//	self->mNetworkCause->setVisible(self->mShrunk);
+//	self->childSetVisible("network_help", self->mShrunk);
 
-	self->mServerText->setVisible(self->mShrunk);
-	self->mServerCause->setVisible(self->mShrunk);
-	self->childSetVisible("server_help", self->mShrunk);
+//	self->mServerText->setVisible(self->mShrunk);
+//	self->mServerCause->setVisible(self->mShrunk);
+//	self->childSetVisible("server_help", self->mShrunk);
 
-	self->mShrunk = !self->mShrunk;
+//	self->mShrunk = !self->mShrunk;
+	gSavedSettings.setBOOL("LagMeterShrunk", !gSavedSettings.getBOOL("LagMeterShrunk"));
 }
diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h
index e8af68ac7a5b83339cf4204f4c99f4f69715a995..6d2086839efb879c7b74083ba62fe82d355f32e9 100644
--- a/indra/newview/llfloaterlagmeter.h
+++ b/indra/newview/llfloaterlagmeter.h
@@ -42,17 +42,18 @@ class LLFloaterLagMeter : public LLFloater, public LLFloaterSingleton<LLFloaterL
 	friend class LLUISingleton<LLFloaterLagMeter, VisibilityPolicy<LLFloater> >;
 	
 public:
+	LLFloaterLagMeter(const LLSD& key);
+	/*virtual*/ ~LLFloaterLagMeter();
+
 	/*virtual*/ void draw();
 	/*virtual*/ BOOL postBuild();	
 private:
-	LLFloaterLagMeter(const LLSD& key);
-	/*virtual*/ ~LLFloaterLagMeter();
 
 	void determineClient();
 	void determineNetwork();
 	void determineServer();
 
-	static void onClickShrink(void * data);
+	void onClickShrink();
 
 	bool mShrunk;
 	S32 mMaxWidth, mMinWidth;
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 6f5bd5f27b1ee9652eef45248b3fa102c8dae20f..f3275913e4c600d7ca3509d87d89dc808a7f2d5e 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -44,11 +44,11 @@
 #include "lluserauth.h"
 
 #include "llagent.h"
-#include "llfloateravatarpicker.h"
 #include "llbutton.h"
 #include "llcheckboxctrl.h"
-#include "llradiogroup.h"
 #include "llcombobox.h"
+#include "llfloaterreg.h"
+#include "llfloateravatarpicker.h"
 #include "llfloaterauction.h"
 #include "llfloatergroups.h"
 #include "llfloatergroupinfo.h"
@@ -889,7 +889,8 @@ void LLPanelLandGeneral::onClickStartAuction(void* data)
 		}
 		else
 		{
-			LLFloaterAuction::showInstance();
+			//LLFloaterAuction::showInstance();
+			LLFloaterReg::showInstance("auction");
 		}
 	}
 }
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index 11842b8b0e9a3849d1117ae417b3545dc423ce90..3d5d2b733f88a739cb5ac6165e97e8b9c433cee4 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -163,7 +163,9 @@ bool LLNotificationChannelPanel::update(const LLSD& payload, bool passed_filter)
 LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key)
 : LLFloater()
 {
-	LLUICtrlFactory::instance().buildFloater(this, "floater_notifications_console.xml");
+	mCommitCallbackRegistrar.add("ClickAdd",     boost::bind(&LLFloaterNotificationConsole::onClickAdd, this));	
+
+	//LLUICtrlFactory::instance().buildFloater(this, "floater_notifications_console.xml");
 }
 
 void LLFloaterNotificationConsole::onClose(bool app_quitting)
@@ -187,7 +189,7 @@ BOOL LLFloaterNotificationConsole::postBuild()
 	addChannel("Notifications");
 	addChannel("NotificationTips");
 
-	getChild<LLButton>("add_notification")->setClickedCallback(onClickAdd, this);
+//	getChild<LLButton>("add_notification")->setClickedCallback(onClickAdd, this);
 
 	LLComboBox* notifications = getChild<LLComboBox>("notification_types");
 	LLNotifications::TemplateNames names = LLNotifications::instance().getTemplateNames();
@@ -236,11 +238,9 @@ void LLFloaterNotificationConsole::updateResizeLimits()
 	setResizeLimits(getMinWidth(), floater_header_size + HEADER_PADDING + ((NOTIFICATION_PANEL_HEADER_HEIGHT + 3) * stack.getNumPanels()));
 }
 
-void LLFloaterNotificationConsole::onClickAdd(void* user_data)
+void LLFloaterNotificationConsole::onClickAdd()
 {
-	LLFloaterNotificationConsole* floater = (LLFloaterNotificationConsole*)user_data;
-
-	std::string message_name = floater->getChild<LLComboBox>("notification_types")->getValue().asString();
+	std::string message_name = getChild<LLComboBox>("notification_types")->getValue().asString();
 	if (!message_name.empty())
 	{
 		LLNotifications::instance().add(message_name, LLSD());
diff --git a/indra/newview/llfloaternotificationsconsole.h b/indra/newview/llfloaternotificationsconsole.h
index 037255318215243410f2be6721dafa4e733d6024..b85437c3c5fde739f9b204441fa4a13616cd5f8e 100644
--- a/indra/newview/llfloaternotificationsconsole.h
+++ b/indra/newview/llfloaternotificationsconsole.h
@@ -55,7 +55,7 @@ class LLFloaterNotificationConsole :
 	void updateResizeLimits();
 
 private:
-	static void onClickAdd(void* user_data);
+	void onClickAdd();
 };
 
 
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index d0df2617b3a3fce6cc7859c9017663b8997f2bee..15d57ebbcc7f983ccb7a37d9f62cf5db77321508 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -57,18 +57,61 @@
 #include "llfloatervoicedevicesettings.h"
 #include "llkeyboard.h"
 #include "llmodaldialog.h"
-#include "llpaneldisplay.h"
 #include "llpanellogin.h"
 #include "llradiogroup.h"
+#include "llsky.h"
 #include "llstylemap.h"
 #include "llscrolllistctrl.h"
 #include "llscrolllistitem.h"
 #include "llsliderctrl.h"
 #include "lltabcontainer.h"
+#include "lltrans.h"
 #include "lltexteditor.h"
 #include "llviewercontrol.h"
 #include "llviewercamera.h"
 #include "llviewerwindow.h"
+#include "llviewermessage.h"
+#include "llviewershadermgr.h"
+#include "llvotree.h"
+#include "llvosky.h"
+
+// linden library includes
+#include "llerror.h"
+#include "llfontgl.h"
+#include "llrect.h"
+#include "llstring.h"
+
+// project includes
+
+#include "llbutton.h"
+#include "llflexibleobject.h"
+#include "lllineeditor.h"
+#include "llresmgr.h"
+#include "llspinctrl.h"
+#include "llstartup.h"
+#include "lltextbox.h"
+
+#include "llui.h"
+
+#include "llviewerimage.h"
+#include "llviewerimagelist.h"
+#include "llviewerobjectlist.h"
+
+#include "llvoavatar.h"
+#include "llvovolume.h"
+#include "llwindow.h"
+#include "llworld.h"
+#include "pipeline.h"
+#include "lluictrlfactory.h"
+#include "llboost.h"
+
+
+//RN temporary includes for resolution switching
+#include "llglheaders.h"
+const F32 MAX_USER_FAR_CLIP = 512.f;
+const F32 MIN_USER_FAR_CLIP = 64.f;
+
+const S32 ASPECT_RATIO_STR_LEN = 100;
 
 class LLVoiceSetKeyDialog : public LLModalDialog
 	{
@@ -136,6 +179,9 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response
 bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater);
 bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater);
 
+bool extractWindowSizeFromString(const std::string& instr, U32 &width, U32 &height);
+void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
+
 LLMediaBase *get_web_media()
 {
 	LLMediaBase *media_source;
@@ -223,8 +269,41 @@ bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFl
 	return false;
 }
 
+
+// Extract from strings of the form "<width> x <height>", e.g. "640 x 480".
+bool extractWindowSizeFromString(const std::string& instr, U32 &width, U32 &height)
+{
+	using namespace boost;
+	cmatch what;
+	const regex expression("([0-9]+) x ([0-9]+)");
+	if (regex_match(instr.c_str(), what, expression))
+	{
+		width = atoi(what[1].first);
+		height = atoi(what[2].first);
+		return true;
+	}
+	
+	width = height = 0;
+	return false;
+}
+
+void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator)
+{
+	numerator = 0;
+	denominator = 0;
+	for (F32 test_denominator = 1.f; test_denominator < 30.f; test_denominator += 1.f)
+	{
+		if (fmodf((decimal_val * test_denominator) + 0.01f, 1.f) < 0.02f)
+		{
+			numerator = llround(decimal_val * test_denominator);
+			denominator = llround(test_denominator);
+			break;
+		}
+	}
+}
 // static
 std::string LLFloaterPreference::sSkin = "";
+F32 LLFloaterPreference::sAspectRatio = 0.0;
 //////////////////////////////////////////////
 // LLFloaterPreference
 
@@ -235,9 +314,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
 {
 	//Build Floater is now Called from 	LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
           
-	mFactoryMap["display"]		= LLCallbackMap((LLCallbackMap::callback_t)LLCallbackMap::buildPanel<LLPanelDisplay>);               /// done fixing the callbacks
-
-
 	mCommitCallbackRegistrar.add("Pref.Apply",				boost::bind(&LLFloaterPreference::onBtnApply, this));
 	mCommitCallbackRegistrar.add("Pref.Cancel",				boost::bind(&LLFloaterPreference::onBtnCancel, this));
 	mCommitCallbackRegistrar.add("Pref.OK",					boost::bind(&LLFloaterPreference::onBtnOK, this));
@@ -261,9 +337,14 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
 	mCommitCallbackRegistrar.add("Pref.HardwareSettings",       boost::bind(&LLFloaterPreference::onOpenHardwareSettings, this));	
 	mCommitCallbackRegistrar.add("Pref.HardwareDefaults",       boost::bind(&LLFloaterPreference::setHardwareDefaults, this));	
 	mCommitCallbackRegistrar.add("Pref.VertexShaderEnable",     boost::bind(&LLFloaterPreference::onVertexShaderEnable, this));	
-	gSavedSkinSettings.getControl("HTMLLinkColor")->getCommitSignal()->connect(boost::bind(&handleHTMLLinkColorChanged,  _2));
-	//gSavedSettings.getControl("UseExternalBrowser")->getCommitSignal()->connect(boost::bind(&LLPanelPreference::handleUseExternalBrowserChanged, this));
+	mCommitCallbackRegistrar.add("Pref.WindowedMod",            boost::bind(&LLFloaterPreference::onCommitWindowedMode, this));	
+	mCommitCallbackRegistrar.add("Pref.UpdateSliderText",       boost::bind(&LLFloaterPreference::onUpdateSliderText,this, _1,_2));	
+	mCommitCallbackRegistrar.add("Pref.AutoDetectAspect",       boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this));	
+	mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio",    boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this));	
+	mCommitCallbackRegistrar.add("Pref.QualityPerformance",     boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));	
 	
+	gSavedSkinSettings.getControl("HTMLLinkColor")->getCommitSignal()->connect(boost::bind(&handleHTMLLinkColorChanged,  _2));
+
 }
 
 BOOL LLFloaterPreference::postBuild()
@@ -271,20 +352,27 @@ BOOL LLFloaterPreference::postBuild()
 	LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
 	if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
 		tabcontainer->selectFirstTab();
-	
-	
 	return TRUE;
 }
 
 LLFloaterPreference::~LLFloaterPreference()
 {
+	// clean up user data
+	LLComboBox* ctrl_aspect_ratio = getChild<LLComboBox>( "aspect_ratio");
+	LLComboBox* ctrl_window_size = getChild<LLComboBox>("windowsize combo");
+	for (S32 i = 0; i < ctrl_aspect_ratio->getItemCount(); i++)
+	{
+		ctrl_aspect_ratio->setCurrentByIndex(i);
+	}
+	for (S32 i = 0; i < ctrl_window_size->getItemCount(); i++)
+	{
+		ctrl_window_size->setCurrentByIndex(i);
+	}
 }
 void LLFloaterPreference::draw()
 {
 	BOOL has_first_selected = (getChildRef<LLScrollListCtrl>("disabled_popups").getFirstSelected()!=NULL);
 	gSavedSettings.setBOOL("FirstSelectedDisabledPopups", has_first_selected);
-	
-	
 	LLFloater::draw();
 }
 
@@ -368,6 +456,14 @@ void LLFloaterPreference::apply()
 		}
 	}
 
+	applyResolution();
+	
+	// Only set window size if we're not in fullscreen mode
+	if(gSavedSettings.getBOOL("NotFullScreen"))
+	{
+		applyWindowSize();
+	}
+	
 }
 
 void LLFloaterPreference::cancel()
@@ -396,7 +492,11 @@ void LLFloaterPreference::cancel()
 	{
 		voice_device_settings ->cancel();
 	}
+	
 	LLFloaterReg::hideInstance("pref_voicedevicesettings");
+	
+	gSavedSettings.setF32("FullScreenAspectRatio", sAspectRatio);
+
 }
 
 void LLFloaterPreference::onOpen(const LLSD& key)
@@ -517,32 +617,17 @@ void LLFloaterPreference::onChangeCustom()
 
 	refreshEnabledGraphics();
 }
-//////////////////////////////////////////////////////////////////////////
-// static     Note:(angela) NOT touching LLPanelDisplay for this milestone (skinning-11)
+
 void LLFloaterPreference::refreshEnabledGraphics()
 {
 	LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
 	if(instance)
 	{
 		LLFloaterHardwareSettings::instance()->refreshEnabledState();
-		
-		LLTabContainer* tabcontainer = instance->getChild<LLTabContainer>("pref core");
-		for (child_list_t::const_iterator iter = tabcontainer->getChildList()->begin();
-			 iter != tabcontainer->getChildList()->end(); ++iter)
-		{
-			LLView* view = *iter;
-			if(!view)
-				return;
-			if(view->getName()=="display")
-			{
-				LLPanelDisplay* display_panel = dynamic_cast<LLPanelDisplay*>(view);
-				if(!display_panel)
-					return;
-				display_panel->refreshEnabledState();
-			}	
-		}
+		instance->refreshEnabledState();
 	}
 }
+
 void LLFloaterPreference::updateMeterText(LLUICtrl* ctrl)
 {
 	// get our UI widgets
@@ -693,6 +778,208 @@ void LLFloaterPreference::buildLists(void* data)
 	}
 }
 
+void LLFloaterPreference::refreshEnabledState()
+{
+	
+	// disable graphics settings and exit if it's not set to custom
+	if(!gSavedSettings.getBOOL("RenderCustomSettings"))
+	{
+		return;
+	}
+	
+	LLCheckBoxCtrl* ctrl_reflections = getChild<LLCheckBoxCtrl>("Reflections");
+	LLRadioGroup* radio_reflection_detail = getChild<LLRadioGroup>("ReflectionDetailRadio");
+	
+	// Reflections
+	BOOL reflections = gSavedSettings.getBOOL("VertexShaderEnable") 
+		&& gGLManager.mHasCubeMap
+		&& LLCubeMap::sUseCubeMaps;
+	ctrl_reflections->setEnabled(reflections);
+	
+	// Bump & Shiny	
+	bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
+	getChild<LLCheckBoxCtrl>("BumpShiny")->setEnabled(bumpshiny ? TRUE : FALSE);
+	
+	for (S32 i = 0; i < radio_reflection_detail->getItemCount(); ++i)
+	{
+		radio_reflection_detail->setIndexEnabled(i, ctrl_reflections->get() && reflections);
+	}
+	
+	// Avatar Mode
+	// Enable Avatar Shaders
+	LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
+	// Avatar Render Mode
+	LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
+
+	S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel;
+	ctrl_avatar_vp->setEnabled((max_avatar_shader > 0) ? TRUE : FALSE);
+	
+	if (gSavedSettings.getBOOL("VertexShaderEnable") == FALSE || 
+		gSavedSettings.getBOOL("RenderAvatarVP") == FALSE)
+	{
+		ctrl_avatar_cloth->setEnabled(false);
+	} 
+	else
+	{
+		ctrl_avatar_cloth->setEnabled(true);
+	}
+	
+	// Vertex Shaders
+	// Global Shader Enable
+	LLCheckBoxCtrl* ctrl_shader_enable   = getChild<LLCheckBoxCtrl>("BasicShaders");
+	// radio set for terrain detail mode
+	LLRadioGroup*   mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio");   // can be linked with control var
+
+	ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
+	
+	BOOL shaders = ctrl_shader_enable->get();
+	if (shaders)
+	{
+		mRadioTerrainDetail->setValue(1);
+		mRadioTerrainDetail->setEnabled(FALSE);
+	}
+	else
+	{
+		mRadioTerrainDetail->setEnabled(TRUE);
+	}
+	
+	// WindLight
+	LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
+	
+	// *HACK just checks to see if we can use shaders... 
+	// maybe some cards that use shaders, but don't support windlight
+	ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
+	// now turn off any features that are unavailable
+	disableUnavailableSettings();
+}
+
+void LLFloaterPreference::disableUnavailableSettings()
+{	
+	LLCheckBoxCtrl* ctrl_reflections   = getChild<LLCheckBoxCtrl>("Reflections");
+	LLCheckBoxCtrl* ctrl_avatar_vp     = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
+	LLCheckBoxCtrl* ctrl_avatar_cloth  = getChild<LLCheckBoxCtrl>("AvatarCloth");
+	LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
+	LLCheckBoxCtrl* ctrl_wind_light    = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
+	LLCheckBoxCtrl* ctrl_avatar_impostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
+
+	// if vertex shaders off, disable all shader related products
+	if(!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
+	{
+		ctrl_shader_enable->setEnabled(FALSE);
+		ctrl_shader_enable->setValue(FALSE);
+		
+		ctrl_wind_light->setEnabled(FALSE);
+		ctrl_wind_light->setValue(FALSE);
+		
+		ctrl_reflections->setEnabled(FALSE);
+		ctrl_reflections->setValue(FALSE);
+		
+		ctrl_avatar_vp->setEnabled(FALSE);
+		ctrl_avatar_vp->setValue(FALSE);
+		
+		ctrl_avatar_cloth->setEnabled(FALSE);
+		ctrl_avatar_cloth->setValue(FALSE);
+	}
+	
+	// disabled windlight
+	if(!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders"))
+	{
+		ctrl_wind_light->setEnabled(FALSE);
+		ctrl_wind_light->setValue(FALSE);
+	}
+	
+	// disabled reflections
+	if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderWaterReflections"))
+	{
+		ctrl_reflections->setEnabled(FALSE);
+		ctrl_reflections->setValue(FALSE);
+	}
+	
+	// disabled av
+	if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP"))
+	{
+		ctrl_avatar_vp->setEnabled(FALSE);
+		ctrl_avatar_vp->setValue(FALSE);
+		
+		ctrl_avatar_cloth->setEnabled(FALSE);
+		ctrl_avatar_cloth->setValue(FALSE);
+	}
+	// disabled cloth
+	if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth"))
+	{
+		ctrl_avatar_cloth->setEnabled(FALSE);
+		ctrl_avatar_cloth->setValue(FALSE);
+	}
+	// disabled impostors
+	if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors"))
+	{
+		ctrl_avatar_impostors->setEnabled(FALSE);
+		ctrl_avatar_impostors->setValue(FALSE);
+	}
+}
+
+void LLFloaterPreference::onCommitAutoDetectAspect()
+{
+	BOOL auto_detect = getChild<LLCheckBoxCtrl>("aspect_auto_detect")->get();
+	F32 ratio;
+	
+	if (auto_detect)
+	{
+		S32 numerator = 0;
+		S32 denominator = 0;
+		
+		// clear any aspect ratio override
+		gViewerWindow->mWindow->setNativeAspectRatio(0.f);
+		fractionFromDecimal(gViewerWindow->mWindow->getNativeAspectRatio(), numerator, denominator);
+		
+		std::string aspect;
+		if (numerator != 0)
+		{
+			aspect = llformat("%d:%d", numerator, denominator);
+		}
+		else
+		{
+			aspect = llformat("%.3f", gViewerWindow->mWindow->getNativeAspectRatio());
+		}
+		
+		getChild<LLComboBox>( "aspect_ratio")->setLabel(aspect);
+		
+		ratio = gViewerWindow->mWindow->getNativeAspectRatio();
+		gSavedSettings.setF32("FullScreenAspectRatio", ratio);
+	}
+}
+
+void LLFloaterPreference::refresh()
+{
+	LLPanel::refresh();
+
+	// sliders and their text boxes
+	//	mPostProcess = gSavedSettings.getS32("RenderGlowResolutionPow");
+	// slider text boxes
+	updateSliderText(getChild<LLSliderCtrl>("ObjectMeshDetail"), getChild<LLTextBox>("ObjectMeshDetailText"));
+	updateSliderText(getChild<LLSliderCtrl>("FlexibleMeshDetail"), getChild<LLTextBox>("FlexibleMeshDetailText"));
+	updateSliderText(getChild<LLSliderCtrl>("TreeMeshDetail"), getChild<LLTextBox>("TreeMeshDetailText"));
+	updateSliderText(getChild<LLSliderCtrl>("AvatarMeshDetail"), getChild<LLTextBox>("AvatarMeshDetailText"));
+	updateSliderText(getChild<LLSliderCtrl>("TerrainMeshDetail"), getChild<LLTextBox>("TerrainMeshDetailText"));
+	updateSliderText(getChild<LLSliderCtrl>("RenderPostProcess"), getChild<LLTextBox>("PostProcessText"));
+	updateSliderText(getChild<LLSliderCtrl>("SkyMeshDetail"), getChild<LLTextBox>("SkyMeshDetailText"));
+	
+	refreshEnabledState();
+}
+
+void LLFloaterPreference::onCommitWindowedMode()
+{
+	refresh();
+}
+
+void LLFloaterPreference::onChangeQuality(const LLSD& data)
+{
+	U32 level = (U32)(data.asReal());
+	LLFeatureManager::getInstance()->setGraphicsLevel(level, true);
+	refreshEnabledGraphics();
+	refresh();
+}
+
 // static
 // DEV-24146 -  needs to be removed at a later date. jan-2009
 void LLFloaterPreference::cleanupBadSetting()
@@ -790,9 +1077,9 @@ void LLFloaterPreference::onCommitLogging()
 {
 	enableHistory();
 }
+
 void LLFloaterPreference::enableHistory()
 {
-	
 	if (childGetValue("log_instant_messages").asBoolean() || childGetValue("log_chat").asBoolean())
 	{
 		childEnable("log_show_history");
@@ -850,6 +1137,158 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
 
 }
 
+void LLFloaterPreference::onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name)
+{
+	if(name.asString() =="" || !hasChild("name"))
+		return;
+	
+	LLTextBox* text_box = getChild<LLTextBox>(name.asString());
+	LLSliderCtrl* slider = dynamic_cast<LLSliderCtrl*>(ctrl);
+	updateSliderText(slider, text_box);
+}
+
+void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box)
+{
+	if(text_box == NULL || ctrl== NULL)
+		return;
+	
+	// get range and points when text should change
+	F32 value = (F32)ctrl->getValue().asReal();
+	F32 min = ctrl->getMinValue();
+	F32 max = ctrl->getMaxValue();
+	F32 range = max - min;
+	llassert(range > 0);
+	F32 midPoint = min + range / 3.0f;
+	F32 highPoint = min + (2.0f * range / 3.0f);
+	
+	// choose the right text
+	if(value < midPoint)
+	{
+		text_box->setText(LLTrans::getString("GraphicsQualityLow"));
+	} 
+	else if (value < highPoint)
+	{
+		text_box->setText(LLTrans::getString("GraphicsQualityMid"));
+	}
+	else
+	{
+		text_box->setText(LLTrans::getString("GraphicsQualityHigh"));
+	}
+}
+
+void LLFloaterPreference::onKeystrokeAspectRatio()
+{
+	getChild<LLCheckBoxCtrl>("aspect_auto_detect")->set(FALSE);
+}
+
+void LLFloaterPreference::applyWindowSize()
+{
+	LLComboBox* ctrl_windowSize = getChild<LLComboBox>("windowsize combo");
+	if (ctrl_windowSize->getVisible() && (ctrl_windowSize->getCurrentIndex() != -1))
+	{
+		U32 width = 0;
+		U32 height = 0;
+		if (extractWindowSizeFromString(ctrl_windowSize->getValue().asString().c_str(), width,height))
+		{
+			LLViewerWindow::movieSize(width, height);
+		}
+	}
+}
+
+void LLFloaterPreference::applyResolution()
+{
+	LLComboBox* ctrl_aspect_ratio = getChild<LLComboBox>( "aspect_ratio");
+	gGL.flush();
+	char aspect_ratio_text[ASPECT_RATIO_STR_LEN];		/*Flawfinder: ignore*/
+	if (ctrl_aspect_ratio->getCurrentIndex() == -1)
+	{
+		// *Can't pass const char* from c_str() into strtok
+		strncpy(aspect_ratio_text, ctrl_aspect_ratio->getSimple().c_str(), sizeof(aspect_ratio_text) -1);	/*Flawfinder: ignore*/
+		aspect_ratio_text[sizeof(aspect_ratio_text) -1] = '\0';
+		char *element = strtok(aspect_ratio_text, ":/\\");
+		if (!element)
+		{
+			sAspectRatio = 0.f; // will be clamped later
+		}
+		else
+		{
+			LLLocale locale(LLLocale::USER_LOCALE);
+			sAspectRatio = (F32)atof(element);
+		}
+		
+		// look for denominator
+		element = strtok(NULL, ":/\\");
+		if (element)
+		{
+			LLLocale locale(LLLocale::USER_LOCALE);
+			
+			F32 denominator = (F32)atof(element);
+			if (denominator != 0.f)
+			{
+				sAspectRatio /= denominator;
+			}
+		}
+	}
+	else
+	{
+		sAspectRatio = (F32)ctrl_aspect_ratio->getValue().asReal();
+	}
+	
+	// presumably, user entered a non-numeric value if aspect_ratio == 0.f
+	if (sAspectRatio != 0.f)
+	{
+		sAspectRatio = llclamp(sAspectRatio, 0.2f, 5.f);
+		gSavedSettings.setF32("FullScreenAspectRatio", sAspectRatio);
+	}
+	
+	// Screen resolution
+	S32 num_resolutions;
+	LLWindow::LLWindowResolution* supported_resolutions = 
+	gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions);
+	U32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex();
+	gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth);
+	gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight);
+	
+	gViewerWindow->requestResolutionUpdate(!gSavedSettings.getBOOL("NotFullScreen"));
+	
+	send_agent_update(TRUE);
+	
+	// Update enable/disable
+	refresh();
+}
+
+void LLFloaterPreference::initWindowSizeControls(LLPanel* panelp)
+{
+	// Window size
+	//	mWindowSizeLabel = getChild<LLTextBox>("WindowSizeLabel");
+	LLComboBox* ctrl_window_size = panelp->getChild<LLComboBox>("windowsize combo");
+	
+	// Look to see if current window size matches existing window sizes, if so then
+	// just set the selection value...
+	const U32 height = gViewerWindow->getWindowDisplayHeight();
+	const U32 width = gViewerWindow->getWindowDisplayWidth();
+	for (S32 i=0; i < ctrl_window_size->getItemCount(); i++)
+	{
+		U32 height_test = 0;
+		U32 width_test = 0;
+		ctrl_window_size->setCurrentByIndex(i);
+		if (extractWindowSizeFromString(ctrl_window_size->getValue().asString(), width_test, height_test))
+		{
+			if ((height_test == height) && (width_test == width))
+			{
+				return;
+			}
+		}
+	}
+	// ...otherwise, add a new entry with the current window height/width.
+	LLUIString resolution_label = panelp->getString("resolution_format");
+	resolution_label.setArg("[RES_X]", llformat("%d", width));
+	resolution_label.setArg("[RES_Y]", llformat("%d", height));
+	ctrl_window_size->add(resolution_label, ADD_TOP);
+	ctrl_window_size->setCurrentByIndex(0);
+}
+
+
 
 //----------------------------------------------------------------------------
 static LLRegisterPanelClassWrapper<LLPanelPreference> t_places("panel_preference");
@@ -858,14 +1297,12 @@ LLPanelPreference::LLPanelPreference()
 {
 	//
 	mCommitCallbackRegistrar.add("setControlFalse",		boost::bind(&LLPanelPreference::setControlFalse,this, _2));
-	
 }
 //virtual
 BOOL LLPanelPreference::postBuild()
 {
 	if (hasChild("maturity_desired_combobox"))
 	{
-
 		/////////////////////////// From LLPanelGeneral //////////////////////////
 		// if we have no agent, we can't let them choose anything
 		// if we have an agent, then we only let them choose if they have a choice
@@ -935,6 +1372,94 @@ BOOL LLPanelPreference::postBuild()
 		childSetText("busy_response", getString("log_in_to_change"));
 		
 	}
+
+
+	if(hasChild("fullscreen combo"))
+	{
+		//============================================================================
+		// Resolution
+
+		S32 num_resolutions = 0;
+		LLWindow::LLWindowResolution* supported_resolutions = gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions);
+		
+		S32 fullscreen_mode = num_resolutions - 1;
+		
+		LLComboBox*ctrl_full_screen = getChild<LLComboBox>( "fullscreen combo");
+		LLUIString resolution_label = getString("resolution_format");
+		
+		for (S32 i = 0; i < num_resolutions; i++)
+		{
+			resolution_label.setArg("[RES_X]", llformat("%d", supported_resolutions[i].mWidth));
+			resolution_label.setArg("[RES_Y]", llformat("%d", supported_resolutions[i].mHeight));
+			ctrl_full_screen->add( resolution_label, ADD_BOTTOM );
+		}
+		
+		{
+			BOOL targetFullscreen;
+			S32 targetWidth;
+			S32 targetHeight;
+			
+			gViewerWindow->getTargetWindow(targetFullscreen, targetWidth, targetHeight);
+			
+			if (targetFullscreen)
+			{
+				fullscreen_mode = 0; // default to 800x600
+				for (S32 i = 0; i < num_resolutions; i++)
+				{
+					if (targetWidth == supported_resolutions[i].mWidth
+						&&  targetHeight == supported_resolutions[i].mHeight)
+					{
+						fullscreen_mode = i;
+					}
+				}
+				ctrl_full_screen->setCurrentByIndex(fullscreen_mode);
+			}
+			else
+			{
+				// set to windowed mode
+				//fullscreen_mode = mCtrlFullScreen->getItemCount() - 1;
+				ctrl_full_screen->setCurrentByIndex(0);
+			}
+		}
+		
+		LLFloaterPreference::initWindowSizeControls(this);
+		
+		if (gSavedSettings.getBOOL("FullScreenAutoDetectAspectRatio"))
+		{
+			LLFloaterPreference::sAspectRatio = gViewerWindow->getDisplayAspectRatio();
+		}
+		else
+		{
+			LLFloaterPreference::sAspectRatio = gSavedSettings.getF32("FullScreenAspectRatio");
+		}
+
+		getChild<LLComboBox>("aspect_ratio")->setTextEntryCallback(boost::bind(&LLPanelPreference::setControlFalse, this, LLSD("FullScreenAutoDetectAspectRatio") ));	
+		
+
+		S32 numerator = 0;
+		S32 denominator = 0;
+		fractionFromDecimal(LLFloaterPreference::sAspectRatio, numerator, denominator);		
+		
+		LLUIString aspect_ratio_text = getString("aspect_ratio_text");
+		if (numerator != 0)
+		{
+			aspect_ratio_text.setArg("[NUM]", llformat("%d",  numerator));
+			aspect_ratio_text.setArg("[DEN]", llformat("%d",  denominator));
+		}	
+		else
+		{
+			aspect_ratio_text = llformat("%.3f", LLFloaterPreference::sAspectRatio);
+		}
+		
+		LLComboBox* ctrl_aspect_ratio = getChild<LLComboBox>( "aspect_ratio");
+		//mCtrlAspectRatio->setCommitCallback(onSelectAspectRatio, this);
+		// add default aspect ratios
+		ctrl_aspect_ratio->add(aspect_ratio_text, &LLFloaterPreference::sAspectRatio, ADD_TOP);
+		ctrl_aspect_ratio->setCurrentByIndex(0);
+		
+		refresh();
+	}
+	
 	apply();
 	return true;
 }
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 000bff4dea80596e6286a6ea4bfaac3e5dc53a87..afff610c69bc69cd783379d136c78d9a99e6ad86 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -43,12 +43,22 @@
 
 class LLPanelPreference;
 class LLPanelLCD;
-class LLPanelDisplay;
 class LLPanelDebug;
 class LLMessageSystem;
 class LLScrollListCtrl;
-
+class LLSliderCtrl;
 class LLSD;
+class LLTextBox;
+
+typedef enum
+	{
+		GS_LOW_GRAPHICS,
+		GS_MID_GRAPHICS,
+		GS_HIGH_GRAPHICS,
+		GS_ULTRA_GRAPHICS
+		
+	} EGraphicsSettings;
+
 
 // Floater to control preferences (display, audio, bandwidth, general.
 class LLFloaterPreference : public LLFloater
@@ -88,6 +98,8 @@ class LLFloaterPreference : public LLFloater
 	void setHardwareDefaults();
 	// callback for when client turns on shaders
 	void onVertexShaderEnable();
+	
+
 public:
 
 	void onClickSetCache();
@@ -106,11 +118,29 @@ class LLFloaterPreference : public LLFloater
 	void enableHistory();
 	void onCommitLogging();
 	void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email);
+	void refreshEnabledState();
+	void disableUnavailableSettings();
+	void onCommitWindowedMode();
+	void refresh();	// Refresh enable/disable
+	// if the quality radio buttons are changed
+	void onChangeQuality(const LLSD& data);
+	
+	void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box);
+	void onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name);
+	void onKeystrokeAspectRatio();
+//	void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
+//	bool extractWindowSizeFromString(const std::string& instr, U32 &width, U32 &height);
+
+	void onCommitAutoDetectAspect();
+	void applyResolution();
+	void applyWindowSize();
+
+	static void initWindowSizeControls(LLPanel* panelp);
 	
 	static void buildLists(void* data);
 	static void refreshSkin(void* data);
 	static void cleanupBadSetting();
-	
+	static F32 sAspectRatio;	
 private:
 	static std::string sSkin;
 	bool mGotPersonalInfo;
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 8ddc929019ead3b28e6bded20d4a9942a23a2708..4b175cdc2770fcc3f6ecbb7c179c507c141cf905 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -188,7 +188,7 @@ BOOL LLFloaterReporter::postBuild()
 	LLLineEditor* le = getChild<LLLineEditor>("abuser_name_edit");
 	le->setEnabled( FALSE );
 
-	setPosBox(mPosition.getValue());
+	setPosBox((LLVector3d)mPosition.getValue());
 	LLButton* pick_btn = getChild<LLButton>("pick_btn");
 	pick_btn->setImages(std::string("tool_face.tga"),
 						std::string("tool_face_active.tga") );
diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp
index 339b90a0f58295b50f70bc37b1d0add6b6f4d7a9..8b6102c67faf0504c698f940a24d1a16dc73edcf 100644
--- a/indra/newview/llfloatersettingsdebug.cpp
+++ b/indra/newview/llfloatersettingsdebug.cpp
@@ -44,7 +44,11 @@
 LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) 
 :	LLFloater(key)
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml");
+	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml");
+	mCommitCallbackRegistrar.add("SettingSelect",	boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this,_1));
+	mCommitCallbackRegistrar.add("CommitSettings",	boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this));
+	mCommitCallbackRegistrar.add("ClickDefault",	boost::bind(&LLFloaterSettingsDebug::onClickDefault, this));
+
 }
 
 LLFloaterSettingsDebug::~LLFloaterSettingsDebug()
@@ -82,17 +86,7 @@ BOOL LLFloaterSettingsDebug::postBuild()
 	}
 
 	settings_combo->sortByName();
-	settings_combo->setCommitCallback(onSettingSelect, this);
 	settings_combo->updateSelection();
-
-	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;
 }
@@ -107,21 +101,17 @@ void LLFloaterSettingsDebug::draw()
 }
 
 //static 
-void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data)
+void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl)
 {
-	LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data;
 	LLComboBox* combo_box = (LLComboBox*)ctrl;
 	LLControlVariable* controlp = (LLControlVariable*)combo_box->getCurrentUserdata();
 
-	floaterp->updateControl(controlp);
+	updateControl(controlp);
 }
 
-//static
-void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data)
+void LLFloaterSettingsDebug::onCommitSettings()
 {
-	LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data;
-
-	LLComboBox* settings_combo = floaterp->getChild<LLComboBox>("settings_combo");
+	LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo");
 	LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata();
 
 	LLVector3 vector;
@@ -135,46 +125,46 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data)
 	switch(controlp->type())
 	{		
 	  case TYPE_U32:
-		controlp->set(floaterp->childGetValue("val_spinner_1"));
+		controlp->set(childGetValue("val_spinner_1"));
 		break;
 	  case TYPE_S32:
-		controlp->set(floaterp->childGetValue("val_spinner_1"));
+		controlp->set(childGetValue("val_spinner_1"));
 		break;
 	  case TYPE_F32:
-		controlp->set(LLSD(floaterp->childGetValue("val_spinner_1").asReal()));
+		controlp->set(LLSD(childGetValue("val_spinner_1").asReal()));
 		break;
 	  case TYPE_BOOLEAN:
-		controlp->set(floaterp->childGetValue("boolean_combo"));
+		controlp->set(childGetValue("boolean_combo"));
 		break;
 	  case TYPE_STRING:
-		controlp->set(LLSD(floaterp->childGetValue("val_text").asString()));
+		controlp->set(LLSD(childGetValue("val_text").asString()));
 		break;
 	  case TYPE_VEC3:
-		vector.mV[VX] = (F32)floaterp->childGetValue("val_spinner_1").asReal();
-		vector.mV[VY] = (F32)floaterp->childGetValue("val_spinner_2").asReal();
-		vector.mV[VZ] = (F32)floaterp->childGetValue("val_spinner_3").asReal();
+		vector.mV[VX] = (F32)childGetValue("val_spinner_1").asReal();
+		vector.mV[VY] = (F32)childGetValue("val_spinner_2").asReal();
+		vector.mV[VZ] = (F32)childGetValue("val_spinner_3").asReal();
 		controlp->set(vector.getValue());
 		break;
 	  case TYPE_VEC3D:
-		vectord.mdV[VX] = floaterp->childGetValue("val_spinner_1").asReal();
-		vectord.mdV[VY] = floaterp->childGetValue("val_spinner_2").asReal();
-		vectord.mdV[VZ] = floaterp->childGetValue("val_spinner_3").asReal();
+		vectord.mdV[VX] = childGetValue("val_spinner_1").asReal();
+		vectord.mdV[VY] = childGetValue("val_spinner_2").asReal();
+		vectord.mdV[VZ] = childGetValue("val_spinner_3").asReal();
 		controlp->set(vectord.getValue());
 		break;
 	  case TYPE_RECT:
-		rect.mLeft = floaterp->childGetValue("val_spinner_1").asInteger();
-		rect.mRight = floaterp->childGetValue("val_spinner_2").asInteger();
-		rect.mBottom = floaterp->childGetValue("val_spinner_3").asInteger();
-		rect.mTop = floaterp->childGetValue("val_spinner_4").asInteger();
+		rect.mLeft = childGetValue("val_spinner_1").asInteger();
+		rect.mRight = childGetValue("val_spinner_2").asInteger();
+		rect.mBottom = childGetValue("val_spinner_3").asInteger();
+		rect.mTop = childGetValue("val_spinner_4").asInteger();
 		controlp->set(rect.getValue());
 		break;
 	  case TYPE_COL4:
-		col3.setValue(floaterp->childGetValue("color_swatch"));
-		col4 = LLColor4(col3, (F32)floaterp->childGetValue("val_spinner_4").asReal());
+		col3.setValue(childGetValue("val_color_swatch"));
+		col4 = LLColor4(col3, (F32)childGetValue("val_spinner_4").asReal());
 		controlp->set(col4.getValue());
 		break;
 	  case TYPE_COL3:
-		controlp->set(floaterp->childGetValue("color_swatch"));
+		controlp->set(childGetValue("val_color_swatch"));
 		//col3.mV[VRED] = (F32)floaterp->childGetValue("val_spinner_1").asC();
 		//col3.mV[VGREEN] = (F32)floaterp->childGetValue("val_spinner_2").asReal();
 		//col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal();
@@ -186,16 +176,15 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data)
 }
 
 // static
-void LLFloaterSettingsDebug::onClickDefault(void* user_data)
+void LLFloaterSettingsDebug::onClickDefault()
 {
-	LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data;
-	LLComboBox* settings_combo = floaterp->getChild<LLComboBox>("settings_combo");
+	LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo");
 	LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata();
 
 	if (controlp)
 	{
 		controlp->resetToDefault();
-		floaterp->updateControl(controlp);
+		updateControl(controlp);
 	}
 }
 
@@ -206,7 +195,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
 	LLSpinCtrl* spinner2 = getChild<LLSpinCtrl>("val_spinner_2");
 	LLSpinCtrl* spinner3 = getChild<LLSpinCtrl>("val_spinner_3");
 	LLSpinCtrl* spinner4 = getChild<LLSpinCtrl>("val_spinner_4");
-	LLColorSwatchCtrl* color_swatch = getChild<LLColorSwatchCtrl>("color_swatch");
+	LLColorSwatchCtrl* color_swatch = getChild<LLColorSwatchCtrl>("val_color_swatch");
 
 	if (!spinner1 || !spinner2 || !spinner3 || !spinner4 || !color_swatch)
 	{
diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h
index 0a98021c791b33e4ae8a79cc59810f2b44b6fa91..87833793af047a4c1ace7f3088e3bb6501285498 100644
--- a/indra/newview/llfloatersettingsdebug.h
+++ b/indra/newview/llfloatersettingsdebug.h
@@ -52,9 +52,9 @@ class LLFloaterSettingsDebug
 
 	void updateControl(LLControlVariable* control);
 
-	static void onSettingSelect(LLUICtrl* ctrl, void* user_data);
-	static void onCommitSettings(LLUICtrl* ctrl, void* user_data);
-	static void onClickDefault(void* user_data);
+	void onSettingSelect(LLUICtrl* ctrl);
+	void onCommitSettings();
+	void onClickDefault();
 
 protected:
 	LLTextEditor* mComment;
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 62a8c0d27e69e80fa1228696e007eb9f15b130ed..4bcf470317e8c718505e1e65789e694795130f14 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -45,6 +45,7 @@
 #include "lldraghandle.h"
 #include "llfloaterbuildoptions.h"
 #include "llfloateropenobject.h"
+#include "llfloaterreg.h"
 #include "llfocusmgr.h"
 #include "llmenugl.h"
 #include "llpanelcontents.h"
@@ -952,7 +953,7 @@ void LLFloaterTools::setObjectType( LLPCode pcode )
 void LLFloaterTools::onClickGridOptions(void* data)
 {
 	//LLFloaterTools* floaterp = (LLFloaterTools*)data;
-	LLFloaterBuildOptions::showInstance();
+	LLFloaterReg::showInstance("build_options");
 	// RN: this makes grid options dependent on build tools window
 	//floaterp->addDependentFloater(LLFloaterBuildOptions::getInstance(), FALSE);
 }
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 5b17c98ef0c5488ab4a5fdd8347e8e887d9d7c32..fd8c22b8e57c7d3a512a0dd9ae0928967585bdf5 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -82,7 +82,7 @@ const S32 ICON_WIDTH = 16;
 const S32 TEXT_PAD = 1;
 const S32 ARROW_SIZE = 12;
 const S32 RENAME_WIDTH_PAD = 4;
-const S32 RENAME_HEIGHT_PAD = 6;
+const S32 RENAME_HEIGHT_PAD = 2;
 const S32 AUTO_OPEN_STACK_DEPTH = 16;
 const S32 MIN_ITEM_WIDTH_VISIBLE = ICON_WIDTH + ICON_PAD + ARROW_SIZE + TEXT_PAD + /*first few characters*/ 40;
 const S32 MINIMUM_RENAMER_WIDTH = 80;
@@ -2560,7 +2560,7 @@ LLFolderView::LLFolderView(const Params& p)
 	LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory.xml", gMenuHolder);
 	if (!menu)
 	{
-		menu = LLUICtrlFactory::createDummyWidget<LLMenuGL>("inventory_menu");
+		menu = LLUICtrlFactory::getDefaultWidget<LLMenuGL>("inventory_menu");
 	}
 	menu->setBackgroundColor(gSavedSkinSettings.getColor("MenuPopupBgColor"));
 	mPopupMenuHandle = menu->getHandle();
@@ -2772,6 +2772,9 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
 		reshape( llmax(min_width, total_width), running_height );
 	}
 
+	// move item renamer text field to item's new position
+	updateRenamerPosition();
+
 	mTargetHeight = (F32)target_height;
 	return llround(mTargetHeight);
 }
@@ -3620,23 +3623,8 @@ void LLFolderView::startRenamingSelectedItem( void )
 	{
 		mRenameItem = item;
 
-		S32 x = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD - 1 + item->getIndentation();
-		S32 y = llfloor(item->getRect().getHeight()-sFont->getLineHeight()-2);
-		item->localPointToScreen( x, y, &x, &y );
-		screenPointToLocal( x, y, &x, &y );
-		mRenamer->setOrigin( x, y );
-
-		S32 scroller_height = 0;
-		S32 scroller_width = gViewerWindow->getWindowWidth();
-		BOOL dummy_bool;
-		if (mScrollContainer)
-		{
-			mScrollContainer->calcVisibleSize( &scroller_width, &scroller_height, &dummy_bool, &dummy_bool);
-		}
+		updateRenamerPosition();
 
-		S32 width = llmax(llmin(item->getRect().getWidth() - x, scroller_width - x - getRect().mLeft), MINIMUM_RENAMER_WIDTH);
-		S32 height = llfloor(sFont->getLineHeight() + RENAME_HEIGHT_PAD);
-		mRenamer->reshape( width, height, TRUE );
 
 		mRenamer->setText(item->getName());
 		mRenamer->selectAll();
@@ -4386,6 +4374,31 @@ void LLFolderView::dumpSelectionInformation()
 	llinfos << "****************************************" << llendl;
 }
 
+void LLFolderView::updateRenamerPosition()
+{
+	if(mRenameItem)
+	{
+		S32 x = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD - 1 + mRenameItem->getIndentation();
+		S32 y = llfloor(mRenameItem->getRect().getHeight()-sFont->getLineHeight()-2);
+		mRenameItem->localPointToScreen( x, y, &x, &y );
+		screenPointToLocal( x, y, &x, &y );
+		mRenamer->setOrigin( x, y );
+
+		S32 scroller_height = 0;
+		S32 scroller_width = gViewerWindow->getWindowWidth();
+		BOOL dummy_bool;
+		if (mScrollContainer)
+		{
+			mScrollContainer->calcVisibleSize( &scroller_width, &scroller_height, &dummy_bool, &dummy_bool);
+		}
+
+		S32 width = llmax(llmin(mRenameItem->getRect().getWidth() - x, scroller_width - x - getRect().mLeft), MINIMUM_RENAMER_WIDTH);
+		S32 height = llfloor(sFont->getLineHeight() + RENAME_HEIGHT_PAD);
+		mRenamer->reshape( width, height, TRUE );
+	}
+}
+
+
 ///----------------------------------------------------------------------------
 /// Local function definitions
 ///----------------------------------------------------------------------------
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 2393aa627c5ea9f1f8384b9dd6d0a0feaa9dc7ca..848d289bb9968bed3a0a7f3bc610e0bc63a12ef7 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -915,6 +915,9 @@ class LLFolderView : public LLFolderViewFolder, public LLEditMenuHandler
 	// DEBUG only
 	void dumpSelectionInformation();
 
+private:
+	void updateRenamerPosition();
+
 protected:
 	LLScrollContainer* mScrollContainer;  // NULL if this is not a child of a scroll container.
 
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 4aaa7ca6cb1dd00a1a0839f3d4bf50f602c89d34..fac0de0f337dea354467a4c80fad7bbd50beec7c 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -426,7 +426,9 @@ void LLLocationInputCtrl::rebuildLocationHistory(std::string filter)
 	LLLocationHistory* lh = LLLocationHistory::getInstance();
 	
 	if (filter.empty())
+	{
 		itemsp = &lh->getItems();
+	}
 	else
 	{
 		lh->getMatchingItems(filter, filtered_items);
@@ -435,7 +437,9 @@ void LLLocationInputCtrl::rebuildLocationHistory(std::string filter)
 	
 	removeall();
 	for (LLLocationHistory::location_list_t::const_reverse_iterator it = itemsp->rbegin(); it != itemsp->rend(); it++)
+	{
 		add(*it);
+	}
 }
 
 void LLLocationInputCtrl::focusTextEntry()
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index 379cd48a6a6167b920f7600e992b77d2d2044c76..6f64aa68ad442284b08ae32bf467522a56306591 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -68,8 +68,8 @@ class LLNameListCtrl
 
 	struct NameColumn : public LLInitParam::Choice<NameColumn>
 	{
-		Option<S32>				column_index;
-		Option<std::string>		column_name;
+		Alternative<S32>				column_index;
+		Alternative<std::string>		column_name;
 		NameColumn()
 		:	column_name("name_column"),
 			column_index("name_column_index", 0)
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
index 457397a379c72c3d3244ad0346868720ec123898..0d25272f88adde923682ae979e68674ea8fc49d0 100644
--- a/indra/newview/llpanelprofileview.cpp
+++ b/indra/newview/llpanelprofileview.cpp
@@ -45,8 +45,8 @@ static std::string PANEL_PROFILE = "panel_profile";
 static std::string PANEL_PICKS = "panel_picks";
 static std::string PANEL_NOTES = "panel_notes";
 
-LLPanelProfileView::LLPanelProfileView(const LLPanel::Params& p)
-: LLPanel(p)
+LLPanelProfileView::LLPanelProfileView()
+: LLPanel()
 {
 }
 
diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h
index 4d8170452239d99eaba1640fac4498152b452b4a..2d89f15fe450a36c56cf4e7369794ec0cd34bfa6 100644
--- a/indra/newview/llpanelprofileview.h
+++ b/indra/newview/llpanelprofileview.h
@@ -44,7 +44,7 @@ class LLPanelProfileView : public LLPanel
 	friend class LLUICtrlFactory;
 
 public:
-	LLPanelProfileView(const LLPanel::Params& p = defaultParams());
+	LLPanelProfileView();
 
 	~LLPanelProfileView(void);
 
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 22e8ada2eaaaf077f16aac1df09e46cbb3915466..eb35834dc0fd1053e435ad0ebd78aab2d0cc6a6b 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -92,15 +92,8 @@ void LLTeleportHistoryPanel::onShowOnMap()
 
 	S32 index = itemp->getColumn(LIST_INDEX)->getValue().asInteger();
 
-	const LLTeleportHistory::slurl_list_t& hist_items = mTeleportHistory->getItems();
-
-	LLVector3d global_pos = hist_items[index].mGlobalPos;
-	
-	if (!global_pos.isExactlyZero())
-	{
-		LLFloaterWorldMap::getInstance()->trackLocation(global_pos);
-		LLFloaterReg::showInstance("world_map", "center");
-	}
+	// teleport to existing item in history, so we don't add it again
+	mTeleportHistory->goToItem(index);
 }
 
 // virtual
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 981a843d9447ee4934642fb3ccf25a8e274bfb2a..8c2372ee74cff45c00a309f444284e618abfb906 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -732,7 +732,7 @@ void LLStatusBar::onClickSearch(void* data)
 // static
 void LLStatusBar::onClickStatGraph(void* data)
 {
-	LLFloaterLagMeter::showInstance();
+	LLFloaterReg::showInstance("lagmeter");
 }
 
 BOOL can_afford_transaction(S32 cost)
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 950d5ba20c891215cb742243efc9146be488d039..03c4915e66f3ea6a036735939f6ec64831042485 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -39,20 +39,26 @@
 
 #include "llcompilequeue.h"
 #include "llfloaterabout.h"
+#include "llfloaterauction.h"
 #include "llfloateraddlandmark.h"
 #include "llfloateravatarinfo.h"
+#include "llfloaterbuildoptions.h"
+#include "llfloaterbump.h"
 #include "llfloaterchat.h"
 #include "llfloaterchatterbox.h"
 #include "llfloaterdirectory.h"
 #include "llfloaterjoystick.h"
-#include "llfloatervoicedevicesettings.h"
+#include "llfloaternotificationsconsole.h"
+#include "llfloaterlagmeter.h"
 #include "llfloatermap.h"
 #include "llfloatermemleak.h"
 #include "llfloatermute.h"
 #include "llfloaterpreference.h"
 #include "llfloatersnapshot.h"
+#include "llfloatersettingsdebug.h"
 #include "llfloatertools.h"
 #include "llfloateruipreview.h"
+#include "llfloatervoicedevicesettings.h"
 #include "llfloaterworldmap.h"
 #include "llinventoryview.h"
 #include "llnearbychathistory.h"
@@ -80,6 +86,13 @@ void LLViewerFloaterReg::registerFloaters()
 	LLFloaterReg::add("add_landmark", "floater_add_landmark.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAddLandmark>);
 	LLFloaterReg::add("mute", "floater_mute.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMute>);
 	
+	LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
+	LLFloaterReg::add("build_options", "floater_build_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuildOptions>);
+	LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>);
+	LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>);
+	LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
+	LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLagMeter>);
+
 	LLFloaterReg::add("ui_preview", "floater_ui_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterUIPreview>);
 	LLFloaterReg::add("test_widgets", "floater_test_widgets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
 	
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index bdc86a3a69a2cbe92f8cc1f482219473394d5fe9..826aca5e64b1350420dd2f92f6ce564b40df093c 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -121,6 +121,7 @@
 #include "llfloaterperms.h"
 #include "llfloaterpostprocess.h"
 #include "llfloaterpreference.h"
+#include "llfloaterreg.h"
 #include "llfloaterregioninfo.h"
 #include "llfloaterreporter.h"
 #include "llfloaterscriptdebug.h"
@@ -613,7 +614,8 @@ class LLAdvancedToggleConsole : public view_listener_t
 #endif
 		else if ("notifications" == console_type)
 		{
-			LLFloaterNotificationConsole::showInstance();
+			//LLFloaterNotificationConsole::showInstance();
+			LLFloaterReg::showInstance("notifications_console");
 		}
 		return true;
 	}
@@ -2145,7 +2147,8 @@ class LLAdvancedShowDebugSettings : public view_listener_t
 {
 	bool handleEvent(const LLSD& userdata)
 	{
-		LLFloaterSettingsDebug::showInstance(userdata);
+	//	LLFloaterSettingsDebug::showInstance(userdata);
+		LLFloaterReg::showInstance("settings_debug",userdata);
 		return true;
 	}
 };
@@ -5649,7 +5652,7 @@ class LLShowFloater : public view_listener_t
 		}
 		else if (floater_name == "grid options")
 		{
-			LLFloaterBuildOptions::showInstance();
+			LLFloaterReg::showInstance("build_options");
 		}
 		else if (floater_name == "script errors")
 		{
@@ -5673,12 +5676,13 @@ class LLShowFloater : public view_listener_t
 		{
 			if (!gNoRender)
 			{
-				LLFloaterBump::showInstance();
+				//LLFloaterBump::showInstance();
+				LLFloaterReg::showInstance("bumps");
 			}
 		}
 		else if (floater_name == "lag meter")
 		{
-			LLFloaterLagMeter::showInstance();
+			LLFloaterReg::showInstance("lagmeter");
 		}
 		else if (floater_name == "buy currency")
 		{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index a62e59bc109f9e029b5b4fa1a18ee357a685f04e..a05bd3060046cb1a241190009a5363078dfe9218 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4395,8 +4395,8 @@ void handle_show_mean_events(void *)
 	{
 		return;
 	}
-
-	LLFloaterBump::showInstance();
+	LLFloaterReg::showInstance("bumps");
+	//LLFloaterBump::showInstance();
 }
 
 void mean_name_callback(const LLUUID &id, const std::string& first, const std::string& last, BOOL always_false)
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index cb2a8771fa942a6e7cdd4aa8dc6080b695675c5a..46aa284258579df85e2bbf806a73a7a1e67f1fb1 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2131,7 +2131,8 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
 	    && (MASK_CONTROL & mask)
 	    && ('5' == key))
 	{
-		LLFloaterNotificationConsole::showInstance();
+		//LLFloaterNotificationConsole::showInstance();
+		LLFloaterReg::showInstance("notifications_console");
 		return TRUE;
 	}
 
@@ -2428,51 +2429,59 @@ void LLViewerWindow::updateUI()
 		root_view = mRootView;
 	}
 
-	// walk UI tree in depth-first order
-	LLView::tree_iterator_t end_it;
-	for (LLView::tree_iterator_t it = root_view->beginTree();
-		it != end_it;
-		++it)
-	{
-		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.skipDescendants();
-			continue;
-		}
+	// aggregate visible views that contain mouse cursor in display order
 
-		// if this view is mouse opaque, nothing behind it should be in mouse_hover_set
-		if (viewp->getMouseOpaque())
+	// while the top_ctrl contains the mouse cursor, only it and its descendants will receive onMouseEnter events
+	if (top_ctrl && top_ctrl->calcScreenBoundingRect().pointInRect(x, y))
+	{
+		// iterator over contents of top_ctrl, and throw into mouse_hover_set
+		for (LLView::tree_iterator_t it = top_ctrl->beginTree();
+			it != top_ctrl->endTree();
+			++it)
 		{
-			// constrain further iteration to children of this widget
-			it = viewp->beginTree();
+			LLView* viewp = *it;
+			if (viewp->getVisible()
+				&& viewp->calcScreenBoundingRect().pointInRect(x, y))
+			{
+				// we have a view that contains the mouse, add it to the set
+				mouse_hover_set.insert(viewp->getHandle());
+			}
+			else
+			{
+				// skip this view and all of its children
+				it.skipDescendants();
+			}
 		}
-
-		// we have a view that contains the mouse, add it to the set
-		mouse_hover_set.insert(viewp->getHandle());
 	}
-
-	// now do the same aggregation for the "top" ctrl, whose parent does not necessarily contain the mouse
-	if (top_ctrl)
+	else
 	{
-		for (LLView::tree_iterator_t it = top_ctrl->beginTree();
-			it != root_view->endTree();
+		// walk UI tree in depth-first order
+		LLView::tree_iterator_t end_it;
+		for (LLView::tree_iterator_t it = root_view->beginTree();
+			it != end_it;
 			++it)
 		{
 			LLView* viewp = *it;
-			if (!viewp->getVisible()
-				|| !viewp->calcScreenBoundingRect().pointInRect(x, y))
+			// calculating the screen rect involves traversing the parent, so this is less than optimal
+			if (viewp->getVisible()
+				&& viewp->calcScreenBoundingRect().pointInRect(x, y))
+			{
+
+				// if this view is mouse opaque, nothing behind it should be in mouse_hover_set
+				if (viewp->getMouseOpaque())
+				{
+					// constrain further iteration to children of this widget
+					it = viewp->beginTree();
+				}
+	
+				// we have a view that contains the mouse, add it to the set
+				mouse_hover_set.insert(viewp->getHandle());
+			}
+			else
 			{
 				// skip this view and all of its children
 				it.skipDescendants();
-				continue;
 			}
-
-			// we have a view that contains the mouse, add it to the set
-			mouse_hover_set.insert(viewp->getHandle());
 		}
 	}
 
@@ -2898,11 +2907,25 @@ void LLViewerWindow::updateWorldViewRect()
 	if (!LLSideTray::instanceCreated()) return;
 
 	LLRect new_world_rect = mWindowRect;
+
+	// pull in right side of world view based on sidetray
 	LLSideTray* sidetray = LLSideTray::getInstance();
 	if (sidetray->getVisible())
 	{
 		new_world_rect.mRight -= llround((F32)sidetray->getTrayWidth() * mDisplayScale.mV[VX]);
 	}
+
+	// push top of world view below nav bar
+	if (LLNavigationBar::getInstance()->getVisible())
+	{
+		LLNavigationBar* barp = LLNavigationBar::getInstance();
+		LLRect nav_bar_rect;
+		if(barp->localRectToOtherView(barp->getLocalRect(), &nav_bar_rect, mRootView))
+		{
+			new_world_rect.mTop = llround((F32)LLNavigationBar::getInstance()->getRect().mBottom * mDisplayScale.mV[VY]);
+		}
+	}
+
 	if (mWorldViewRect != new_world_rect)
 	{
 		mWorldViewRect = new_world_rect;
diff --git a/indra/newview/skins/default/xui/en/floater_auction.xml b/indra/newview/skins/default/xui/en/floater_auction.xml
index 21d060fdda6eb88472d4872d30ab32e8a597f932..076332e062d5a0d45fc5fccacdff5ac9d02a6c99 100644
--- a/indra/newview/skins/default/xui/en/floater_auction.xml
+++ b/indra/newview/skins/default/xui/en/floater_auction.xml
@@ -29,6 +29,7 @@
      top_pad="12"
      width="400" />
     <check_box
+     control_name="AuctionShowFence" 
      follows="left|bottom"
      height="16"
      initial_value="true"
@@ -47,7 +48,10 @@
      left_delta="0"
      name="snapshot_btn"
      top_pad="4"
-     width="96" />
+     width="96" >
+      <button.commit_callback
+         function="ClickSnapshot" />
+    </button>
     <button
      follows="left|bottom"
      height="20"
@@ -57,5 +61,8 @@
      left_pad="4"
      name="ok_btn"
      top_delta="0"
-     width="48" />
+     width="48">
+      <button.commit_callback
+          function="ClickOK" />
+    </button>
 </floater>
diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
index 0e2904650022ef6fcc9aa10da44da782cea8f2bc..001229416064d7ef1f217b884f8cf797cafa2492 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
@@ -64,17 +64,17 @@
              left_delta="0"
              name="Edit"
              top_pad="4"
-             width="132" />
+             width="50" />
             <button
              follows="top|right"
              height="20"
              label="Find"
              label_selected="Find"
              layout="topleft"
-             left_pad="30"
+             left_pad="5"
              name="Find"
              top_delta="-1"
-             width="95" />
+             width="62" />
             <scroll_list
              follows="left|top|right|bottom"
              height="90"
@@ -196,12 +196,12 @@
      top="324"
      width="95" />
     <button
-     follows="left|bottom"
+     follows="right|bottom"
      height="20"
      label="Cancel"
      label_selected="Cancel"
      layout="topleft"
-     left_pad="70"
+     right="-10" 
      name="Cancel"
      top_delta="0"
      width="95" />
diff --git a/indra/newview/skins/default/xui/en/floater_lagmeter.xml b/indra/newview/skins/default/xui/en/floater_lagmeter.xml
index ebe8df9f5ecf7e4f7d204ceefa9e7204eb606ad7..8af4f74aa3d59e3e429ecd5397f3611191964e2a 100644
--- a/indra/newview/skins/default/xui/en/floater_lagmeter.xml
+++ b/indra/newview/skins/default/xui/en/floater_lagmeter.xml
@@ -201,6 +201,7 @@
         Client:
     </text>
     <text
+	 make_visible_control="LagMeterShrunk"
      type="string"
      length="1"
      bottom="40"
@@ -214,6 +215,7 @@
         Normal
     </text>
     <text
+	 make_visible_control="LagMeterShrunk"	
      bottom="56"
      follows="left|top"
      height="16"
@@ -248,6 +250,7 @@
         Network:
     </text>
     <text
+	 make_visible_control="LagMeterShrunk"
      type="string"
      length="1"
      bottom="80"
@@ -261,6 +264,7 @@
         Normal
     </text>
     <text
+	 make_visible_control="LagMeterShrunk"	
      bottom="96"
      follows="left|top"
      height="16"
@@ -295,6 +299,7 @@
         Server:
     </text>
     <text
+	 make_visible_control="LagMeterShrunk"
      type="string"
      length="1"
      bottom="120"
@@ -308,6 +313,7 @@
         Normal
     </text>
     <text
+	 make_visible_control="LagMeterShrunk"
      bottom="136"
      follows="left|top"
      height="16"
@@ -333,5 +339,8 @@
      left_delta="-317"
      name="minimize"
      top_delta="-2"
-     width="25" />
+     width="25">
+        <button.commit_callback
+         function="LagMeter.ClickShrink" />
+    </button>
 </floater>
diff --git a/indra/newview/skins/default/xui/en/floater_notifications_console.xml b/indra/newview/skins/default/xui/en/floater_notifications_console.xml
index 92ecb5908e289b32ae5ec093142975debc1152b6..14aa12aed740ab60d04d7669fc749dd7fda8f2fa 100644
--- a/indra/newview/skins/default/xui/en/floater_notifications_console.xml
+++ b/indra/newview/skins/default/xui/en/floater_notifications_console.xml
@@ -24,7 +24,10 @@
      left_pad="3"
      name="add_notification"
      top_delta="0"
-     width="50" />
+     width="50" >
+        <button.commit_callback
+         function="ClickAdd" />
+    </button>
     <layout_stack
      bottom="495"
      follows="left|right|top|bottom"
diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml
index ba28016d8eca08044990352a080c057e53ea342f..1760d5b8187b16c539d8a0fce21295f24ecc6ef6 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences.xml
@@ -109,6 +109,7 @@
          layout="topleft"
          name="web" />
         <panel
+		 class="panel_preference"
          filename="panel_preferences_graphics1.xml"
          label="Graphics"
          layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_settings_debug.xml b/indra/newview/skins/default/xui/en/floater_settings_debug.xml
index 108d0b97e8f6a06bf196f66162e05356d9c8d004..9a73ffb1a2f0052964936b1a7cd8f1b6532e9018 100644
--- a/indra/newview/skins/default/xui/en/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/en/floater_settings_debug.xml
@@ -15,7 +15,10 @@
      max_chars="255"
      name="settings_combo"
      top="30"
-     width="200" />
+     width="200">
+      <combo_box.commit_callback
+       function="SettingSelect" />
+    </combo_box>
     <text_editor
      enabled="false"
      height="60"
@@ -41,6 +44,8 @@
         <combo_box.item
          label="FALSE"
          value="" />
+         <combo_box.commit_callback
+           function="CommitSettings" />
     </combo_box>
     <line_editor
      height="20"
@@ -49,14 +54,21 @@
      name="val_text"
      top_delta="0"
      visible="false"
-     width="300" />
+     width="300" >
+      <line_editor.commit_callback
+       function="CommitSettings" />
+    </line_editor>
     <color_swatch
      bottom="185"
      can_apply_immediately="true"
      height="55"
+     name="val_color_swatch" 
      label="Color"
      layout="topleft"
-     width="37" />
+     width="37" >
+      <color_swatch.commit_callback
+       function="CommitSettings" />
+    </color_swatch>
     <spinner
      height="20"
      label="x"
@@ -66,7 +78,10 @@
      name="val_spinner_1"
      top_delta="10"
      visible="false"
-     width="120" />
+     width="120" >
+      <spinner.commit_callback
+       function="CommitSettings" />
+    </spinner>
     <spinner
      height="20"
      label="x"
@@ -76,7 +91,10 @@
      name="val_spinner_2"
      top_delta="0"
      visible="false"
-     width="120" />
+     width="120">
+      <spinner.commit_callback
+       function="CommitSettings" />
+    </spinner>
     <spinner
      height="20"
      label="x"
@@ -86,7 +104,10 @@
      name="val_spinner_3"
      top="160"
      visible="false"
-     width="120" />
+     width="120">
+      <spinner.commit_callback
+       function="CommitSettings" />
+    </spinner>
     <spinner
      height="20"
      label="x"
@@ -96,7 +117,10 @@
      name="val_spinner_4"
      top_delta="0"
      visible="false"
-     width="120" />
+     width="120" >
+      <spinner.commit_callback
+       function="CommitSettings" />
+    </spinner>
     <button
      height="20"
      label="Reset to default"
@@ -104,5 +128,8 @@
      left="15"
      name="default_btn"
      top="190"
-     width="150" />
+     width="150" >
+      <button.commit_callback
+       function="ClickDefault" />
+    </button>
 </floater>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index 929f857e9015cf0d86c732e9891a0b8be2851d03..8db8c8f31df518e9a4926f01938fc0f22bdaddb8 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -165,6 +165,9 @@
          enabled="true"
          label="16:9 (Widescreen)"
          value="1.7777777" />
+		 <combo_box.commit_callback
+         function="setControlFalse"
+		 parameter="FullScreenAutoDetectAspectRatio" />
     </combo_box>
     <check_box
 	 make_invisible_control="NotFullScreen"
@@ -336,7 +339,10 @@
      name="QualityPerformanceSelection"
      show_text="false"
      top_delta="-1"
-     width="150" />
+     width="150">
+	 <slider.commit_callback
+			function="Pref.QualityPerformance"/>
+	</slider>		
     <check_box
      control_name="RenderCustomSettings"
      height="16"