diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-03-17 14:56:01 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-03-17 14:56:01 -0400 |
| commit | f64a20ddcff91677b02b7688e08819cffb0989c9 (patch) | |
| tree | 707b1430e5b7ef2e27f4f34c66822e92dfffd294 /indra/llui/lluictrlfactory.cpp | |
| parent | c077250ff16aeaf0ec4c036154a427c677e85eb3 (diff) | |
| parent | 17d87b0fa5bdd8d15dbcd98e65c30ebf4e5b94ec (diff) | |
merge changes for storm-1016
Diffstat (limited to 'indra/llui/lluictrlfactory.cpp')
| -rw-r--r-- | indra/llui/lluictrlfactory.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 5de96f9d48..25e7a31e90 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -152,7 +152,27 @@ static LLFastTimer::DeclareTimer FTM_XML_PARSE("XML Reading/Parsing"); bool LLUICtrlFactory::getLayeredXMLNode(const std::string &xui_filename, LLXMLNodePtr& root) { LLFastTimer timer(FTM_XML_PARSE); - return LLXMLNode::getLayeredXMLNode(xui_filename, root, LLUI::getXUIPaths()); + + std::vector<std::string> paths; + std::string path = gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), xui_filename); + if (!path.empty()) + { + paths.push_back(path); + } + + std::string localize_path = gDirUtilp->findSkinnedFilename(LLUI::getLocalizedSkinPath(), xui_filename); + if (!localize_path.empty() && localize_path != path) + { + paths.push_back(localize_path); + } + + if (paths.empty()) + { + // sometimes whole path is passed in as filename + paths.push_back(xui_filename); + } + + return LLXMLNode::getLayeredXMLNode(root, paths); } @@ -214,7 +234,7 @@ LLView *LLUICtrlFactory::createFromXML(LLXMLNodePtr node, LLView* parent, const std::string LLUICtrlFactory::getCurFileName() { - return mFileNames.empty() ? "" : gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + mFileNames.back(); + return mFileNames.empty() ? "" : mFileNames.back(); } |
