From 124bc854dd7c3dffc044f306cf836a5d6c68bd2e Mon Sep 17 00:00:00 2001
From: Richard Nelson <none@none>
Date: Mon, 16 Aug 2010 17:44:23 -0700
Subject: moved buildFloater out of lluictrlfactory to llfloater.cpp

---
 indra/llui/llfloater.cpp                        | 63 +++++++++++++++++++++++
 indra/llui/llfloater.h                          |  1 +
 indra/llui/llfloaterreg.cpp                     |  2 +-
 indra/llui/llpanel.h                            |  4 +-
 indra/llui/lluictrlfactory.cpp                  | 66 +------------------------
 indra/llui/lluictrlfactory.h                    |  3 --
 indra/llui/llview.h                             | 32 ++++++------
 indra/newview/llcompilequeue.cpp                |  1 -
 indra/newview/llfloaterabout.cpp                |  1 -
 indra/newview/llfloaterauction.cpp              |  1 -
 indra/newview/llfloateravatarpicker.cpp         |  1 -
 indra/newview/llfloateravatartextures.cpp       |  1 -
 indra/newview/llfloaterbeacons.cpp              |  2 -
 indra/newview/llfloaterbuildoptions.cpp         |  1 -
 indra/newview/llfloaterbulkpermission.cpp       |  1 -
 indra/newview/llfloaterbump.cpp                 |  1 -
 indra/newview/llfloaterbuy.cpp                  |  1 -
 indra/newview/llfloaterbuycontents.cpp          |  1 -
 indra/newview/llfloaterbuyland.cpp              |  3 +-
 indra/newview/llfloatercolorpicker.cpp          |  3 --
 indra/newview/llfloaterdaycycle.cpp             |  1 -
 indra/newview/llfloaterenvsettings.cpp          |  1 -
 indra/newview/llfloatergodtools.cpp             |  2 -
 indra/newview/llfloaterhardwaresettings.cpp     |  1 -
 indra/newview/llfloaterhud.cpp                  |  2 -
 indra/newview/llfloaterinspect.cpp              |  1 -
 indra/newview/llfloaterjoystick.cpp             |  2 -
 indra/newview/llfloaterlagmeter.cpp             |  1 -
 indra/newview/llfloaterland.cpp                 |  2 -
 indra/newview/llfloaterlandholdings.cpp         |  1 -
 indra/newview/llfloatermap.cpp                  |  1 -
 indra/newview/llfloatermediabrowser.cpp         |  2 -
 indra/newview/llfloaternotificationsconsole.cpp |  3 --
 indra/newview/llfloateropenobject.cpp           |  1 -
 indra/newview/llfloaterperms.cpp                |  1 -
 indra/newview/llfloaterpostcard.cpp             |  1 -
 indra/newview/llfloaterpostprocess.cpp          |  1 -
 indra/newview/llfloaterpreference.cpp           |  1 -
 indra/newview/llfloaterproperties.cpp           |  2 -
 indra/newview/llfloaterregioninfo.cpp           |  1 -
 indra/newview/llfloaterreporter.cpp             |  1 -
 indra/newview/llfloaterscriptdebug.cpp          |  4 --
 indra/newview/llfloatersettingsdebug.cpp        |  1 -
 indra/newview/llfloatersnapshot.cpp             |  1 -
 indra/newview/llfloatertelehub.cpp              |  1 -
 indra/newview/llfloatertools.cpp                |  1 -
 indra/newview/llfloatertopobjects.cpp           |  1 -
 indra/newview/llfloateruipreview.cpp            |  5 +-
 indra/newview/llfloaterurlentry.cpp             |  2 +-
 indra/newview/llfloatervoicedevicesettings.cpp  |  1 -
 indra/newview/llfloaterwater.cpp                |  1 -
 indra/newview/llfloaterwhitelistentry.cpp       |  1 -
 indra/newview/llfloaterwindlight.cpp            |  1 -
 indra/newview/llfloaterwindowsize.cpp           |  1 -
 indra/newview/llfloaterworldmap.cpp             |  1 -
 indra/newview/llpanelmaininventory.cpp          |  1 -
 indra/newview/llpanelmaininventory.h            |  1 +
 indra/newview/llpreviewanim.cpp                 |  1 -
 indra/newview/llpreviewgesture.cpp              |  3 --
 indra/newview/llpreviewnotecard.cpp             |  1 -
 indra/newview/llpreviewscript.cpp               |  6 +--
 indra/newview/llpreviewsound.cpp                |  1 -
 indra/newview/llpreviewtexture.cpp              |  1 -
 indra/newview/llsidepaneliteminfo.cpp           |  2 -
 indra/newview/lltexturectrl.cpp                 |  1 -
 indra/newview/lltoast.cpp                       |  2 +-
 indra/newview/llviewermenu.cpp                  |  2 +-
 67 files changed, 93 insertions(+), 169 deletions(-)

diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 838f93d3f9..d66b3c1707 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -42,6 +42,7 @@
 #include "lluictrlfactory.h"
 #include "llbutton.h"
 #include "llcheckboxctrl.h"
+#include "lldir.h"
 #include "lldraghandle.h"
 #include "llfloaterreg.h"
 #include "llfocusmgr.h"
@@ -2883,3 +2884,65 @@ bool LLFloater::isVisible(const LLFloater* floater)
 {
     return floater && floater->getVisible();
 }
+
+static LLFastTimer::DeclareTimer FTM_BUILD_FLOATERS("Build Floaters");
+
+/* static */
+bool LLFloater::buildFloater(LLFloater* floaterp, const std::string& filename, LLXMLNodePtr output_node)
+{
+	LLFastTimer timer(FTM_BUILD_FLOATERS);
+	LLXMLNodePtr root;
+
+	//if exporting, only load the language being exported, 
+	//instead of layering localized version on top of english
+	if (output_node)
+	{
+		if (!LLUICtrlFactory::getLocalizedXMLNode(filename, root))
+		{
+			llwarns << "Couldn't parse floater from: " << LLUI::getLocalizedSkinPath() + gDirUtilp->getDirDelimiter() + filename << llendl;
+			return false;
+		}
+	}
+	else if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
+	{
+		llwarns << "Couldn't parse floater from: " << LLUI::getSkinPath() + gDirUtilp->getDirDelimiter() + filename << llendl;
+		return false;
+	}
+	
+	// root must be called floater
+	if( !(root->hasName("floater") || root->hasName("multi_floater")) )
+	{
+		llwarns << "Root node should be named floater in: " << filename << llendl;
+		return false;
+	}
+	
+	bool res = true;
+	
+	lldebugs << "Building floater " << filename << llendl;
+	LLUICtrlFactory::instance().pushFileName(filename);
+	{
+		if (!floaterp->getFactoryMap().empty())
+		{
+			LLPanel::sFactoryStack.push_front(&floaterp->getFactoryMap());
+		}
+
+		 // for local registry callbacks; define in constructor, referenced in XUI or postBuild
+		floaterp->getCommitCallbackRegistrar().pushScope();
+		floaterp->getEnableCallbackRegistrar().pushScope();
+		
+		res = floaterp->initFloaterXML(root, floaterp->getParent(), filename, output_node);
+
+		floaterp->setXMLFilename(filename);
+		
+		floaterp->getCommitCallbackRegistrar().popScope();
+		floaterp->getEnableCallbackRegistrar().popScope();
+		
+		if (!floaterp->getFactoryMap().empty())
+		{
+			LLPanel::sFactoryStack.pop_front();
+		}
+	}
+	LLUICtrlFactory::instance().popFileName();
+	
+	return res;
+}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index e7d365238b..69762c7723 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -147,6 +147,7 @@ public:
 
 	// Don't export top/left for rect, only height/width
 	static void setupParamsForExport(Params& p, LLView* parent);
+	static bool buildFloater(LLFloater* floaterp, const std::string &filename, LLXMLNodePtr output_node);
 
 	void initFromParams(const LLFloater::Params& p);
 	bool initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node = NULL);
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index 85f9af126c..2c31854011 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -127,7 +127,7 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key)
 
 				res = build_func(key);
 				
-				bool success = LLUICtrlFactory::getInstance()->buildFloater(res, xui_file, NULL);
+				bool success = LLFloater::buildFloater(res, xui_file, NULL);
 				if (!success)
 				{
 					llwarns << "Failed to build floater type: '" << name << "'." << llendl;
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index 6fc8ca204f..de16d28e27 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -265,6 +265,8 @@ protected:
 	commit_signal_t* mVisibleSignal;		// Called when visibility changes, passes new visibility as LLSD()
 
 	std::string		mHelpTopic;         // the name of this panel's help topic to display in the Help Viewer
+	typedef std::deque<const LLCallbackMap::map_t*> factory_stack_t;
+	static factory_stack_t	sFactoryStack;
 	
 private:
 	BOOL			mBgVisible;				// any background at all?
@@ -286,8 +288,6 @@ private:
 	// for setting the xml filename when building panel in context dependent cases
 	std::string		mXMLFilename;
 
-	typedef std::deque<const LLCallbackMap::map_t*> factory_stack_t;
-	static factory_stack_t	sFactoryStack;
 }; // end class LLPanel
 
 // Build time optimization, generate once in .cpp file
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index 913c8bdb7d..ee700ee6eb 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -48,7 +48,7 @@
 #include "llquaternion.h"
 
 // this library includes
-#include "llfloater.h"
+#include "llpanel.h"
 
 LLFastTimer::DeclareTimer FTM_WIDGET_CONSTRUCTION("Widget Construction");
 LLFastTimer::DeclareTimer FTM_INIT_FROM_PARAMS("Widget InitFromParams");
@@ -178,70 +178,6 @@ bool LLUICtrlFactory::getLocalizedXMLNode(const std::string &xui_filename, LLXML
 	}
 }
 
-static LLFastTimer::DeclareTimer FTM_BUILD_FLOATERS("Build Floaters");
-
-//-----------------------------------------------------------------------------
-// buildFloater()
-//-----------------------------------------------------------------------------
-bool LLUICtrlFactory::buildFloater(LLFloater* floaterp, const std::string& filename, LLXMLNodePtr output_node)
-{
-	LLFastTimer timer(FTM_BUILD_FLOATERS);
-	LLXMLNodePtr root;
-
-	//if exporting, only load the language being exported, 
-	//instead of layering localized version on top of english
-	if (output_node)
-	{
-		if (!LLUICtrlFactory::getLocalizedXMLNode(filename, root))
-		{
-			llwarns << "Couldn't parse floater from: " << LLUI::getLocalizedSkinPath() + gDirUtilp->getDirDelimiter() + filename << llendl;
-			return false;
-		}
-	}
-	else if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
-	{
-		llwarns << "Couldn't parse floater from: " << LLUI::getSkinPath() + gDirUtilp->getDirDelimiter() + filename << llendl;
-		return false;
-	}
-	
-	// root must be called floater
-	if( !(root->hasName("floater") || root->hasName("multi_floater")) )
-	{
-		llwarns << "Root node should be named floater in: " << filename << llendl;
-		return false;
-	}
-	
-	bool res = true;
-	
-	lldebugs << "Building floater " << filename << llendl;
-	pushFileName(filename);
-	{
-		if (!floaterp->getFactoryMap().empty())
-		{
-			LLPanel::sFactoryStack.push_front(&floaterp->getFactoryMap());
-		}
-
-		 // for local registry callbacks; define in constructor, referenced in XUI or postBuild
-		floaterp->getCommitCallbackRegistrar().pushScope();
-		floaterp->getEnableCallbackRegistrar().pushScope();
-		
-		res = floaterp->initFloaterXML(root, floaterp->getParent(), filename, output_node);
-
-		floaterp->setXMLFilename(filename);
-		
-		floaterp->getCommitCallbackRegistrar().popScope();
-		floaterp->getEnableCallbackRegistrar().popScope();
-		
-		if (!floaterp->getFactoryMap().empty())
-		{
-			LLPanel::sFactoryStack.pop_front();
-		}
-	}
-	popFileName();
-	
-	return res;
-}
-
 //-----------------------------------------------------------------------------
 // saveToXML()
 //-----------------------------------------------------------------------------
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index c4d3aa38d8..47f1ba465a 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -38,7 +38,6 @@
 #include "llregistry.h"
 #include "llxuiparser.h"
 
-class LLFloater;
 class LLView;
 
 // sort functor for typeid maps
@@ -147,8 +146,6 @@ public:
 		return ParamDefaults<typename T::Params, 0>::instance().get();
 	}
 
-	bool buildFloater(LLFloater* floaterp, const std::string &filename, LLXMLNodePtr output_node);
-
 	// Does what you want for LLFloaters and LLPanels
 	// Returns 0 on success
 	S32 saveToXML(LLView* viewp, const std::string& filename);
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 37f5232f91..0f796fb408 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -134,26 +134,26 @@ public:
 
 		Optional<std::string>		layout;
 		Optional<LLRect>			rect;
+
 		// Historical bottom-left layout used bottom_delta and left_delta
 		// for relative positioning.  New layout "topleft" prefers specifying
 		// based on top edge.
-		Optional<S32>				bottom_delta,	// deprecated
-									top_pad,	// from last bottom to my top
-									top_delta,	// from last top to my top
-									left_pad,	// from last right to my left
-									left_delta;	// from last left to my left
-								
-		// these are nested attributes for LLLayoutPanel
+		Optional<S32>				bottom_delta,	// from last bottom to my bottom
+									top_pad,		// from last bottom to my top
+									top_delta,		// from last top to my top
+									left_pad,		// from last right to my left
+									left_delta;		// from last left to my left
+
 		//FIXME: get parent context involved in parsing traversal
-		Ignored						user_resize,
-									auto_resize,
-									needs_translate,
-									min_width,
-									max_width,
-									xmlns,
-									xmlns_xsi,
-									xsi_schemaLocation,
-									xsi_type;
+		Ignored						user_resize,		// nested attribute for LLLayoutPanel
+									auto_resize,		// nested attribute for LLLayoutPanel
+									needs_translate,	// cue for translation tools
+									min_width,			// nested attribute for LLLayoutPanel
+									max_width,			// nested attribute for LLLayoutPanel
+									xmlns,				// xml namespace
+									xmlns_xsi,			// xml namespace
+									xsi_schemaLocation,	// xml schema
+									xsi_type;			// xml schema type
 
 		Params();
 	};
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index e91bf33502..78544ac144 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -95,7 +95,6 @@ LLFloaterScriptQueue::LLFloaterScriptQueue(const LLSD& key) :
 	mDone(false),
 	mMono(false)
 {
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_queue.xml", FALSE);
 }
 
 // Destroys the object
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 4bd3151f2e..d122d8780f 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -100,7 +100,6 @@ public:
 LLFloaterAbout::LLFloaterAbout(const LLSD& key) 
 :	LLFloater(key)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about.xml");
 	
 }
 
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index b0265e6cd2..837d956c6f 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -80,7 +80,6 @@ LLFloaterAuction::LLFloaterAuction(const LLSD& key)
   : LLFloater(key),
 	mParcelID(-1)
 {
-//	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml");
 	mCommitCallbackRegistrar.add("ClickSnapshot",	boost::bind(&LLFloaterAuction::onClickSnapshot, this));
 	mCommitCallbackRegistrar.add("ClickSellToAnyone",		boost::bind(&LLFloaterAuction::onClickSellToAnyone, this));
 	mCommitCallbackRegistrar.add("ClickStartAuction",		boost::bind(&LLFloaterAuction::onClickStartAuction, this));
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 7dbf6ebd5b..01e59bb190 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -85,7 +85,6 @@ LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key)
 	mNearMeListComplete(FALSE),
 	mCloseOnSelect(FALSE)
 {
-// 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_avatar_picker.xml");
 	mCommitCallbackRegistrar.add("Refresh.FriendList", boost::bind(&LLFloaterAvatarPicker::populateFriend, this));
 }
 
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index 847462a6c3..efc020aa2a 100644
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -46,7 +46,6 @@ LLFloaterAvatarTextures::LLFloaterAvatarTextures(const LLSD& id)
   : LLFloater(id),
 	mID(id.asUUID())
 {
-// 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_avatar_textures.xml");
 }
 
 LLFloaterAvatarTextures::~LLFloaterAvatarTextures()
diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp
index 975c888a2b..3058eacd48 100644
--- a/indra/newview/llfloaterbeacons.cpp
+++ b/indra/newview/llfloaterbeacons.cpp
@@ -42,8 +42,6 @@
 LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed)
 :	LLFloater(seed)
 {
-//	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_beacons.xml");
-
 	// Initialize pipeline states from saved settings.
 	// OK to do at floater constructor time because beacons do not display unless the floater is open
 	// therefore it is OK to not initialize the pipeline state before needed.
diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp
index 30e9428df9..e59693aa92 100644
--- a/indra/newview/llfloaterbuildoptions.cpp
+++ b/indra/newview/llfloaterbuildoptions.cpp
@@ -46,7 +46,6 @@
 LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key)
   : LLFloater(key)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_build_options.xml");
 }
 
 LLFloaterBuildOptions::~LLFloaterBuildOptions()
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index 766fc0723c..d2138bcb3c 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -63,7 +63,6 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed)
 	mDone(FALSE)
 {
 	mID.generate();
-//	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_bulk_perms.xml");
 	mCommitCallbackRegistrar.add("BulkPermission.Apply",	boost::bind(&LLFloaterBulkPermission::onApplyBtn, this));
 	mCommitCallbackRegistrar.add("BulkPermission.Close",	boost::bind(&LLFloaterBulkPermission::onCloseBtn, this));
 	mCommitCallbackRegistrar.add("BulkPermission.CheckAll",	boost::bind(&LLFloaterBulkPermission::onCheckAll, this));
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index e925796526..c9275ce8cc 100644
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -51,7 +51,6 @@ LLFloaterBump::LLFloaterBump(const LLSD& key)
 :	LLFloater(key)
 {
 	if(gNoRender) return;
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_bumps.xml");
 }
 
 
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index eee4310ec7..4493e723bc 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -57,7 +57,6 @@
 LLFloaterBuy::LLFloaterBuy(const LLSD& key)
 :	LLFloater(key)
 {
-// 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_buy_object.xml");
 }
 
 BOOL LLFloaterBuy::postBuild()
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index 76ec5da303..3cdd7b801b 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -60,7 +60,6 @@
 LLFloaterBuyContents::LLFloaterBuyContents(const LLSD& key)
 :	LLFloater(key)
 {
-// 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_buy_contents.xml");
 }
 
 BOOL LLFloaterBuyContents::postBuild()
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 455cce5e56..78b0f73887 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -299,8 +299,7 @@ LLFloaterBuyLandUI::LLFloaterBuyLandUI(const LLSD& key)
 	mParcelBuyInfo(0)
 {
 	LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver);
-	
-// 	LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_buy_land.xml");
+
 }
 
 LLFloaterBuyLandUI::~LLFloaterBuyLandUI()
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index 6922c515cd..0887c0353d 100644
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -113,9 +113,6 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show
 	  mCanApplyImmediately	( show_apply_immediate ),
 	  mContextConeOpacity	( 0.f )
 {
-	// build the majority of the gui using the factory builder
-	LLUICtrlFactory::getInstance()->buildFloater ( this, "floater_color_picker.xml", NULL );
-	
 	// create user interface for this picker
 	createUI ();
 
diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp
index 50ea2765e7..182a108275 100644
--- a/indra/newview/llfloaterdaycycle.cpp
+++ b/indra/newview/llfloaterdaycycle.cpp
@@ -65,7 +65,6 @@ const F32 LLFloaterDayCycle::sHoursPerDay = 24.0f;
 LLFloaterDayCycle::LLFloaterDayCycle(const LLSD& key)	
 : LLFloater(key)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_day_cycle_options.xml");
 }
 
 BOOL LLFloaterDayCycle::postBuild()
diff --git a/indra/newview/llfloaterenvsettings.cpp b/indra/newview/llfloaterenvsettings.cpp
index eb344b91d3..c05ec0ba2c 100644
--- a/indra/newview/llfloaterenvsettings.cpp
+++ b/indra/newview/llfloaterenvsettings.cpp
@@ -56,7 +56,6 @@
 LLFloaterEnvSettings::LLFloaterEnvSettings(const LLSD& key)
   : LLFloater(key)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_env_settings.xml");
 }
 // virtual
 LLFloaterEnvSettings::~LLFloaterEnvSettings()
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index 61f5098af1..f60aaf3541 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -127,8 +127,6 @@ LLFloaterGodTools::LLFloaterGodTools(const LLSD& key)
 	mFactoryMap["region"] = LLCallbackMap(createPanelRegion, this);
 	mFactoryMap["objects"] = LLCallbackMap(createPanelObjects, this);
 	mFactoryMap["request"] = LLCallbackMap(createPanelRequest, this);
-//	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_god_tools.xml");
-
 }
 
 BOOL LLFloaterGodTools::postBuild()
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index a97e00122a..be033de15f 100644
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -62,7 +62,6 @@ LLFloaterHardwareSettings::LLFloaterHardwareSettings(const LLSD& key)
 	  mFogRatio(0.0),
 	  mProbeHardwareOnStartup(FALSE)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hardware_settings.xml");
 }
 
 LLFloaterHardwareSettings::~LLFloaterHardwareSettings()
diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp
index 930bbe9e6b..ba8e99cb7e 100644
--- a/indra/newview/llfloaterhud.cpp
+++ b/indra/newview/llfloaterhud.cpp
@@ -60,8 +60,6 @@ LLFloaterHUD::LLFloaterHUD(const LLSD& key)
 		return;
 	}
 	
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hud.xml");
-	
 	// Don't grab the focus as it will impede performing in-world actions
 	// while using the HUD
 	setIsChrome(TRUE);
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index 4d4681a68d..93d4a8766a 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -53,7 +53,6 @@ LLFloaterInspect::LLFloaterInspect(const LLSD& key)
   : LLFloater(key),
 	mDirty(FALSE)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inspect.xml");
 	mCommitCallbackRegistrar.add("Inspect.OwnerProfile",	boost::bind(&LLFloaterInspect::onClickOwnerProfile, this));
 	mCommitCallbackRegistrar.add("Inspect.CreatorProfile",	boost::bind(&LLFloaterInspect::onClickCreatorProfile, this));
 	mCommitCallbackRegistrar.add("Inspect.SelectObject",	boost::bind(&LLFloaterInspect::onSelectObject, this));
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index 9c7957603e..9fa8006b7f 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -50,8 +50,6 @@
 LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
 	: LLFloater(data)
 {
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_joystick.xml");
-
 	initFromSettings();
 }
 
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index 9a2c34b40f..0cdf3be8c0 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -53,7 +53,6 @@ const std::string LAG_GOOD_IMAGE_NAME     = "lag_status_good.tga";
 LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
 	:	LLFloater(key)
 {
-//	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml");
 	mCommitCallbackRegistrar.add("LagMeter.ClickShrink",  boost::bind(&LLFloaterLagMeter::onClickShrink, this));	
 }
 
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 19e28720ae..a1692d2b76 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -254,8 +254,6 @@ LLFloaterLand::LLFloaterLand(const LLSD& seed)
 	mFactoryMap["land_media_panel"] =	LLCallbackMap(createPanelLandMedia, this);
 	mFactoryMap["land_access_panel"] =	LLCallbackMap(createPanelLandAccess, this);
 
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about_land.xml", false);
-
 	sObserver = new LLParcelSelectionObserver();
 	LLViewerParcelMgr::getInstance()->addObserver( sObserver );
 }
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp
index 12d27b8790..4ca851b8d2 100644
--- a/indra/newview/llfloaterlandholdings.cpp
+++ b/indra/newview/llfloaterlandholdings.cpp
@@ -66,7 +66,6 @@ LLFloaterLandHoldings::LLFloaterLandHoldings(const LLSD& key)
 	mSortColumn(""),
 	mSortAscending(TRUE)
 {
-// 	LLUICtrlFactory::getInstance()->buildFloater(floater, "floater_land_holdings.xml");
 }
 
 BOOL LLFloaterLandHoldings::postBuild()
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index df176a1f6d..94aee4ea7d 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -75,7 +75,6 @@ LLFloaterMap::LLFloaterMap(const LLSD& key)
 	  mTextBoxSouthWest(NULL),
 	  mMap(NULL)
 {
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_map.xml", FALSE);
 }
 
 LLFloaterMap::~LLFloaterMap()
diff --git a/indra/newview/llfloatermediabrowser.cpp b/indra/newview/llfloatermediabrowser.cpp
index 90147ff650..ad996b5dc8 100644
--- a/indra/newview/llfloatermediabrowser.cpp
+++ b/indra/newview/llfloatermediabrowser.cpp
@@ -59,8 +59,6 @@
 LLFloaterMediaBrowser::LLFloaterMediaBrowser(const LLSD& key)
 	: LLFloater(key)
 {
-//	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_media_browser.xml");
-
 }
 
 //static 
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index 9e3422c2b2..b7bca5c6cd 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -173,8 +173,6 @@ LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key)
 : LLFloater(key)
 {
 	mCommitCallbackRegistrar.add("ClickAdd",     boost::bind(&LLFloaterNotificationConsole::onClickAdd, this));	
-
-	//LLUICtrlFactory::instance().buildFloater(this, "floater_notifications_console.xml");
 }
 
 BOOL LLFloaterNotificationConsole::postBuild()
@@ -254,7 +252,6 @@ LLFloaterNotification::LLFloaterNotification(LLNotification* note)
 :	LLFloater(LLSD()),
 	mNote(note)
 {
-	LLUICtrlFactory::instance().buildFloater(this, "floater_notification.xml", NULL);
 }
 
 BOOL LLFloaterNotification::postBuild()
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index a2a3d300e7..d1c6ddb5b3 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -62,7 +62,6 @@ LLFloaterOpenObject::LLFloaterOpenObject(const LLSD& key)
 	mPanelInventoryObject(NULL),
 	mDirty(TRUE)
 {
-//	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_openobject.xml");
 	mCommitCallbackRegistrar.add("OpenObject.MoveToInventory",	boost::bind(&LLFloaterOpenObject::onClickMoveToInventory, this));
 	mCommitCallbackRegistrar.add("OpenObject.MoveAndWear",		boost::bind(&LLFloaterOpenObject::onClickMoveAndWear, this));
 }
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index 7edc27d4c3..a6188af871 100644
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -43,7 +43,6 @@
 LLFloaterPerms::LLFloaterPerms(const LLSD& seed)
 : LLFloater(seed)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_perm_prefs.xml");
 	mCommitCallbackRegistrar.add("Perms.Copy",	boost::bind(&LLFloaterPerms::onCommitCopy, this));
 	mCommitCallbackRegistrar.add("Perms.OK",	boost::bind(&LLFloaterPerms::onClickOK, this));
 	mCommitCallbackRegistrar.add("Perms.Cancel",	boost::bind(&LLFloaterPerms::onClickCancel, this));
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
index dc4553ef96..99b0c8567d 100644
--- a/indra/newview/llfloaterpostcard.cpp
+++ b/indra/newview/llfloaterpostcard.cpp
@@ -82,7 +82,6 @@ LLFloaterPostcard::LLFloaterPostcard(const LLSD& key)
 	mViewerImage(NULL),
 	mHasFirstMsgFocus(false)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_postcard.xml");
 }
 
 // Destroys the object
diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp
index 06c0a94afa..c6050b4832 100644
--- a/indra/newview/llfloaterpostprocess.cpp
+++ b/indra/newview/llfloaterpostprocess.cpp
@@ -48,7 +48,6 @@
 LLFloaterPostProcess::LLFloaterPostProcess(const LLSD& key)
   : LLFloater(key)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_post_process.xml");
 }
 
 LLFloaterPostProcess::~LLFloaterPostProcess()
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index a4b45e04f2..d1bae173f4 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -137,7 +137,6 @@ LLVoiceSetKeyDialog::LLVoiceSetKeyDialog(const LLSD& key)
   : LLModalDialog(key),
 	mParent(NULL)
 {
-// 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_select_key.xml", NULL);
 }
 
 //virtual
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index b6a98bdada..c577541c66 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -114,8 +114,6 @@ LLFloaterProperties::LLFloaterProperties(const LLUUID& item_id)
 	mDirty(TRUE)
 {
 	mPropertiesObserver = new LLPropertiesObserver(this);
-	
-	//LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml");
 }
 
 // Destroys the object
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index a8af80b952..b61d90043e 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -167,7 +167,6 @@ LLUUID LLFloaterRegionInfo::sRequestInvoice;
 LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed)
 	: LLFloater(seed)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_region_info.xml", FALSE);
 }
 
 BOOL LLFloaterRegionInfo::postBuild()
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 230d4be85b..196bf2d5f2 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -109,7 +109,6 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key)
 	mCopyrightWarningSeen( FALSE ),
 	mResourceDatap(new LLResourceData())
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_abuse.xml");
 }
 
 // static
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index 4a82f3a11c..ad11a3ac5f 100644
--- a/indra/newview/llfloaterscriptdebug.cpp
+++ b/indra/newview/llfloaterscriptdebug.cpp
@@ -58,8 +58,6 @@
 LLFloaterScriptDebug::LLFloaterScriptDebug(const LLSD& key)
   : LLMultiFloater(key)
 {
-// 	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_script_debug.xml");
-	
 	// avoid resizing of the window to match 
 	// the initial size of the tabbed-childs, whenever a tab is opened or closed
 	mAutoResize = FALSE;
@@ -147,8 +145,6 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLSD& object_id)
   : LLFloater(LLSD(object_id)),
 	mObjectID(object_id.asUUID())
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_script_debug_panel.xml");
-	
 	// enabled autocous blocks controling focus via  LLFloaterReg::showInstance
 	setAutoFocus(FALSE);
 }
diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp
index 77e0e4e677..fde84607fe 100644
--- a/indra/newview/llfloatersettingsdebug.cpp
+++ b/indra/newview/llfloatersettingsdebug.cpp
@@ -45,7 +45,6 @@
 LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) 
 :	LLFloater(key)
 {
-	//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));
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index e8a89bb705..8a08687bb8 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -2076,7 +2076,6 @@ LLFloaterSnapshot::LLFloaterSnapshot(const LLSD& key)
 	: LLFloater(key),
 	  impl (*(new Impl))
 {
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_snapshot.xml", FALSE);
 }
 
 // Destroys the object
diff --git a/indra/newview/llfloatertelehub.cpp b/indra/newview/llfloatertelehub.cpp
index 6bd1e70f13..f748d737fb 100644
--- a/indra/newview/llfloatertelehub.cpp
+++ b/indra/newview/llfloatertelehub.cpp
@@ -57,7 +57,6 @@ LLFloaterTelehub::LLFloaterTelehub(const LLSD& key)
 	mTelehubRot(),
 	mNumSpawn(0)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_telehub.xml");
 }
 
 BOOL LLFloaterTelehub::postBuild()
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 0988588d9c..173feff786 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -356,7 +356,6 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
 	mFactoryMap["Contents"] = LLCallbackMap(createPanelContents, this);//LLPanelContents
 	mFactoryMap["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo
 	
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_tools.xml",FALSE);
 	mCommitCallbackRegistrar.add("BuildTool.setTool",			boost::bind(&LLFloaterTools::setTool,this, _2));
 	mCommitCallbackRegistrar.add("BuildTool.commitZoom",		boost::bind(&commit_slider_zoom, _1));
 	mCommitCallbackRegistrar.add("BuildTool.commitRadioFocus",	boost::bind(&commit_radio_group_focus, _1));
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index d80f26657d..37ddd774da 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -70,7 +70,6 @@ void LLFloaterTopObjects::show()
 	}
 
 	sInstance = new LLFloaterTopObjects();
-//	LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_top_objects.xml");
 	sInstance->center();
 }
 */
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index d32f809457..7c2a449343 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -400,7 +400,6 @@ LLFloaterUIPreview::LLFloaterUIPreview(const LLSD& key)
 	mLastDisplayedX(0),
 	mLastDisplayedY(0)
 {
-	// called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_ui_preview.xml");
 }
 
 // Destructor
@@ -838,7 +837,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
 		if (save)
 		{
 			LLXMLNodePtr floater_write = new LLXMLNode();			
-			LLUICtrlFactory::getInstance()->buildFloater(*floaterp, path, floater_write);	// just build it
+			buildFloater(*floaterp, path, floater_write);	// just build it
 
 			if (!floater_write->isNull())
 			{
@@ -852,7 +851,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
 		}
 		else
 		{
-			LLUICtrlFactory::getInstance()->buildFloater(*floaterp, path, NULL);	// just build it
+			buildFloater(*floaterp, path, NULL);	// just build it
 			(*floaterp)->openFloater((*floaterp)->getKey());
 			(*floaterp)->setCanResize((*floaterp)->isResizable());
 		}
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index fa871d84a6..a192cfda3d 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -88,7 +88,7 @@ LLFloaterURLEntry::LLFloaterURLEntry(LLHandle<LLPanel> parent)
 	: LLFloater(LLSD()),
 	  mPanelLandMediaHandle(parent)
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_url_entry.xml", NULL);
+	buildFloater(this, "floater_url_entry.xml", NULL);
 }
 
 //-----------------------------------------------------------------------------
diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp
index 036ef32016..af280ea9dc 100644
--- a/indra/newview/llfloatervoicedevicesettings.cpp
+++ b/indra/newview/llfloatervoicedevicesettings.cpp
@@ -338,7 +338,6 @@ LLFloaterVoiceDeviceSettings::LLFloaterVoiceDeviceSettings(const LLSD& seed)
 	mFactoryMap["device_settings"] = LLCallbackMap(createPanelVoiceDeviceSettings, this);
 	// do not automatically open singleton floaters (as result of getInstance())
 //	BOOL no_open = FALSE;
-//	Called from floater reg:  LLUICtrlFactory::getInstance()->buildFloater(this, "floater_device_settings.xml", no_open);	
 }
 BOOL LLFloaterVoiceDeviceSettings::postBuild()
 {
diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp
index 0f0d85cacb..af15b89044 100644
--- a/indra/newview/llfloaterwater.cpp
+++ b/indra/newview/llfloaterwater.cpp
@@ -69,7 +69,6 @@ std::set<std::string> LLFloaterWater::sDefaultPresets;
 LLFloaterWater::LLFloaterWater(const LLSD& key)
   : LLFloater(key)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_water.xml");
 }
 
 LLFloaterWater::~LLFloaterWater()
diff --git a/indra/newview/llfloaterwhitelistentry.cpp b/indra/newview/llfloaterwhitelistentry.cpp
index 705c8afd00..1ce151d7ed 100644
--- a/indra/newview/llfloaterwhitelistentry.cpp
+++ b/indra/newview/llfloaterwhitelistentry.cpp
@@ -47,7 +47,6 @@
 LLFloaterWhiteListEntry::LLFloaterWhiteListEntry( const LLSD& key ) :
 	LLFloater(key)
 {
-//	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_whitelist_entry.xml");
 }
 
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp
index c8ea6e406b..001d5c9cd6 100644
--- a/indra/newview/llfloaterwindlight.cpp
+++ b/indra/newview/llfloaterwindlight.cpp
@@ -72,7 +72,6 @@ static const F32 WL_SUN_AMBIENT_SLIDER_SCALE = 3.0f;
 LLFloaterWindLight::LLFloaterWindLight(const LLSD& key)
   : LLFloater(key)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_windlight_options.xml");
 }
 
 LLFloaterWindLight::~LLFloaterWindLight()
diff --git a/indra/newview/llfloaterwindowsize.cpp b/indra/newview/llfloaterwindowsize.cpp
index 5519be6f08..1ab796cb9b 100644
--- a/indra/newview/llfloaterwindowsize.cpp
+++ b/indra/newview/llfloaterwindowsize.cpp
@@ -86,7 +86,6 @@ public:
 LLFloaterWindowSize::LLFloaterWindowSize(const LLSD& key) 
 :	LLFloater(key)
 {
-	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_window_size.xml");	
 }
 
 LLFloaterWindowSize::~LLFloaterWindowSize()
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 7fd073ea67..bc999cf1a7 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -205,7 +205,6 @@ LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
 	
 	mFactoryMap["objects_mapview"] = LLCallbackMap(createWorldMapView, NULL);
 	
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_world_map.xml", FALSE);
 	mCommitCallbackRegistrar.add("WMap.Coordinates",	boost::bind(&LLFloaterWorldMap::onCoordinatesCommit, this));
 	mCommitCallbackRegistrar.add("WMap.Location",		boost::bind(&LLFloaterWorldMap::onLocationCommit, this));
 	mCommitCallbackRegistrar.add("WMap.AvatarCombo",	boost::bind(&LLFloaterWorldMap::onAvatarComboCommit, this));
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index d7ffdacb70..9db79df78e 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -648,7 +648,6 @@ LLFloaterInventoryFinder::LLFloaterInventoryFinder(LLPanelMainInventory* invento
 	mPanelMainInventory(inventory_view),
 	mFilter(inventory_view->getPanel()->getFilter())
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inventory_view_finder.xml", NULL);
 	updateElementsFromFilter();
 }
 
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 82b72ac224..816d2f76fb 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -47,6 +47,7 @@ class LLFilterEditor;
 class LLTabContainer;
 class LLFloaterInventoryFinder;
 class LLMenuGL;
+class LLFloater;
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Class LLPanelMainInventory
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index a59ed53889..d65969c05d 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -49,7 +49,6 @@ extern LLAgent gAgent;
 LLPreviewAnim::LLPreviewAnim(const LLSD& key)
 	: LLPreview( key )
 {
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_animation.xml", FALSE);
 }
 
 // static
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 6ef7c85e31..b9caaecbc1 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -317,9 +317,6 @@ LLPreviewGesture::LLPreviewGesture(const LLSD& key)
 	NONE_LABEL =  LLTrans::getString("---");
 	SHIFT_LABEL = LLTrans::getString("KBShift");
 	CTRL_LABEL = LLTrans::getString("KBCtrl");
-	
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_gesture.xml", FALSE);
-
 }
 
 
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index ee86d3a2c6..11cb2ec242 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -77,7 +77,6 @@ LLPreviewNotecard::LLPreviewNotecard(const LLSD& key) //const LLUUID& item_id,
 	{
 		mAssetID = item->getAssetUUID();
 	}	
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard.xml", FALSE);
 }
 
 LLPreviewNotecard::~LLPreviewNotecard()
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 73845e2772..ce465927bb 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -157,7 +157,7 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core)
 :	LLFloater(LLSD()),
 	mEditorCore(editor_core)
 {
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_search.xml", NULL);
+	buildFloater(this,"floater_script_search.xml", NULL);
 
 	sInstance = this;
 	
@@ -660,7 +660,7 @@ void LLScriptEdCore::onBtnDynamicHelp()
 	if (!live_help_floater)
 	{
 		live_help_floater = new LLFloater(LLSD());
-		LLUICtrlFactory::getInstance()->buildFloater(live_help_floater, "floater_lsl_guide.xml", NULL);
+		LLFloater::buildFloater(live_help_floater, "floater_lsl_guide.xml", NULL);
 		LLFloater* parent = dynamic_cast<LLFloater*>(getParent());
 		llassert(parent);
 		if (parent)
@@ -948,7 +948,6 @@ LLPreviewLSL::LLPreviewLSL(const LLSD& key )
 	mPendingUploads(0)
 {
 	mFactoryMap["script panel"] = LLCallbackMap(LLPreviewLSL::createScriptEdPanel, this);
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_preview.xml", FALSE);
 }
 
 // virtual
@@ -1423,7 +1422,6 @@ LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) :
 	mIsNew(false)
 {
 	mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this);
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_live_lsleditor.xml", FALSE);
 }
 
 BOOL LLLiveLSLEditor::postBuild()
diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp
index d9bcf5fba6..8d6f06502d 100644
--- a/indra/newview/llpreviewsound.cpp
+++ b/indra/newview/llpreviewsound.cpp
@@ -51,7 +51,6 @@ const F32 SOUND_GAIN = 1.0f;
 LLPreviewSound::LLPreviewSound(const LLSD& key)
   : LLPreview( key )
 {
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_sound.xml", FALSE);
 }
 
 // virtual
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index c1cb386556..b583fa4134 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -83,7 +83,6 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key)
 	{
 		mPreviewToSave = TRUE;
 	}
-	//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_texture.xml", FALSE);
 }
 
 LLPreviewTexture::~LLPreviewTexture()
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 56bb7167b6..22a2748356 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -94,8 +94,6 @@ LLSidepanelItemInfo::LLSidepanelItemInfo()
   : mItemID(LLUUID::null)
 {
 	mPropertiesObserver = new LLItemPropertiesObserver(this);
-	
-	//LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml");
 }
 
 // Destroys the object
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 127e4010ca..2bf9483a23 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -203,7 +203,6 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
 	mSelectedItemPinned( FALSE )
 {
 	mCanApplyImmediately = can_apply_immediately;
-	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_texture_ctrl.xml",NULL);
 	setCanMinimize(FALSE);
 }
 
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 2bb573c263..06c95b5e9c 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -83,7 +83,7 @@ LLToast::LLToast(const LLToast::Params& p)
 {
 	mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
 
-	LLUICtrlFactory::getInstance()->buildFloater(this, "panel_toast.xml", NULL);
+	buildFloater(this, "panel_toast.xml", NULL);
 
 	setCanDrag(FALSE);
 
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 2a72e255d0..141d7d6b86 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7255,7 +7255,7 @@ void handle_load_from_xml(void*)
 	{
 		std::string filename = picker.getFirstFile();
 		LLFloater* floater = new LLFloater(LLSD());
-		LLUICtrlFactory::getInstance()->buildFloater(floater, filename, NULL);
+		LLFloater::buildFloater(floater, filename, NULL);
 	}
 }
 
-- 
cgit v1.2.3