From c20bd2dfee1068d5a23eef9a10d21c2035c0b324 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 16 Aug 2010 15:00:51 -0700 Subject: cleaned up LLUICtrlFactory... removed redundant functionality moved buildPanel to LLPanel --- indra/newview/llfloateruipreview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloateruipreview.cpp') diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 41f4580495..d32f809457 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -891,7 +891,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) if (save) { LLXMLNodePtr panel_write = new LLXMLNode(); - LLUICtrlFactory::getInstance()->buildPanel(panel, path, panel_write); // build it + buildPanel(panel, path, panel_write); // build it if (!panel_write->isNull()) { @@ -905,7 +905,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) } else { - LLUICtrlFactory::getInstance()->buildPanel(panel, path); // build it + buildPanel(panel, path); // build it LLRect new_size = panel->getRect(); // get its rectangle panel->setOrigin(0,0); // reset its origin point so it's not offset by -left or other XUI attributes (*floaterp)->setTitle(path); // use the file name as its title, since panels have no guaranteed meaningful name attribute -- cgit v1.2.3 From 124bc854dd7c3dffc044f306cf836a5d6c68bd2e Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 16 Aug 2010 17:44:23 -0700 Subject: moved buildFloater out of lluictrlfactory to llfloater.cpp --- indra/newview/llfloateruipreview.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloateruipreview.cpp') 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()); } -- cgit v1.2.3 From 02d8197019dcecec7aee80a104c4644ddb4807ca Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 20 Aug 2010 10:14:28 -0700 Subject: changed buildPanel/buildFloater to member functions buildFromFile streamlined LLUICtrlFactory's interface --- indra/newview/llfloateruipreview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloateruipreview.cpp') diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 7c2a449343..19790c8868 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -837,7 +837,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) if (save) { LLXMLNodePtr floater_write = new LLXMLNode(); - buildFloater(*floaterp, path, floater_write); // just build it + *floaterp->buildFromFile(path, floater_write); // just build it if (!floater_write->isNull()) { @@ -851,7 +851,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) } else { - buildFloater(*floaterp, path, NULL); // just build it + (*floaterp)->buildFromFile(path); // just build it (*floaterp)->openFloater((*floaterp)->getKey()); (*floaterp)->setCanResize((*floaterp)->isResizable()); } @@ -890,7 +890,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) if (save) { LLXMLNodePtr panel_write = new LLXMLNode(); - buildPanel(panel, path, panel_write); // build it + panel->buildFromFile(path, panel_write); // build it if (!panel_write->isNull()) { @@ -904,7 +904,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) } else { - buildPanel(panel, path); // build it + panel->buildFromFile(path); // build it LLRect new_size = panel->getRect(); // get its rectangle panel->setOrigin(0,0); // reset its origin point so it's not offset by -left or other XUI attributes (*floaterp)->setTitle(path); // use the file name as its title, since panels have no guaranteed meaningful name attribute -- cgit v1.2.3 From 8f82c6a75795b5de746574432571ce468a43d13b Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 20 Aug 2010 14:36:34 -0700 Subject: fixed build --- indra/newview/llfloateruipreview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloateruipreview.cpp') diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 19790c8868..9d75900ebf 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -837,7 +837,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) if (save) { LLXMLNodePtr floater_write = new LLXMLNode(); - *floaterp->buildFromFile(path, floater_write); // just build it + (*floaterp)->buildFromFile(path, floater_write); // just build it if (!floater_write->isNull()) { -- cgit v1.2.3