diff options
author | Richard Linden <none@none> | 2010-06-22 18:26:29 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-06-22 18:26:29 -0700 |
commit | 6e961cd9f244bc979f653c8ee468617c280d0e9e (patch) | |
tree | 4966af8a139289d4db632f4f3549d740758accb8 /indra/llui/lluictrlfactory.cpp | |
parent | 7a54ce3cf686d872425c3230b305156b83a36b26 (diff) |
EXT-7729 WIP LLWARNS: Tons of "Making dummy class..." warnings on startup
improved filename output for XUI parser errors
Diffstat (limited to 'indra/llui/lluictrlfactory.cpp')
-rw-r--r-- | indra/llui/lluictrlfactory.cpp | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 4dd155f8e5..6b337e0d74 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -101,7 +101,9 @@ void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitPa if (LLUICtrlFactory::getLayeredXMLNode(filename, root_node)) { + LLUICtrlFactory::instance().pushFileName(filename); LLXUIParser::instance().readXUI(root_node, block, filename); + LLUICtrlFactory::instance().popFileName(); } } @@ -211,7 +213,7 @@ bool LLUICtrlFactory::buildFloater(LLFloater* floaterp, const std::string& filen bool res = true; lldebugs << "Building floater " << filename << llendl; - mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename)); + pushFileName(filename); { if (!floaterp->getFactoryMap().empty()) { @@ -234,7 +236,7 @@ bool LLUICtrlFactory::buildFloater(LLFloater* floaterp, const std::string& filen mFactoryStack.pop_front(); } } - mFileNames.pop_back(); + popFileName(); return res; } @@ -283,7 +285,7 @@ BOOL LLUICtrlFactory::buildPanel(LLPanel* panelp, const std::string& filename, L lldebugs << "Building panel " << filename << llendl; - mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename)); + pushFileName(filename); { if (!panelp->getFactoryMap().empty()) { @@ -306,7 +308,7 @@ BOOL LLUICtrlFactory::buildPanel(LLPanel* panelp, const std::string& filename, L mFactoryStack.pop_front(); } } - mFileNames.pop_back(); + popFileName(); return didPost; } @@ -364,6 +366,23 @@ LLPanel* LLUICtrlFactory::createFactoryPanel(const std::string& name) return create<LLPanel>(panel_p); } +std::string LLUICtrlFactory::getCurFileName() +{ + return mFileNames.empty() ? "" : gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + mFileNames.back(); +} + + +void LLUICtrlFactory::pushFileName(const std::string& name) +{ + mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), name)); +} + +void LLUICtrlFactory::popFileName() +{ + mFileNames.pop_back(); +} + + //----------------------------------------------------------------------------- //static |