diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2016-12-08 14:27:40 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2016-12-08 14:27:40 -0500 |
commit | b6dc755786fb06ab109eb36f402a25edaf24ce14 (patch) | |
tree | 04f465dd42a555f15bf2729ad4a2fcea181db1c9 /indra/llui/lluictrlfactory.cpp | |
parent | 5bb456d80cfbcdfe87526510f3b8297d315afdd8 (diff) | |
parent | a65b586b184d9837e0586b4df0d2e758ccce63f6 (diff) |
Automated merge with ssh://bitbucket.org/lindenlab/viewer-skip-llcorehttp-test
Diffstat (limited to 'indra/llui/lluictrlfactory.cpp')
-rw-r--r-- | indra/llui/lluictrlfactory.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 4cc7da1267..fdefae01b1 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -92,15 +92,27 @@ void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitPa { std::string filename = gDirUtilp->add("widgets", widget_tag + ".xml"); LLXMLNodePtr root_node; + std::vector<std::string> search_paths = + gDirUtilp->findSkinnedFilenames(LLDir::XUI, filename); - // Here we're looking for the "en" version, the default-language version - // of the file, rather than the localized version. - std::string full_filename = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, filename); - if (!full_filename.empty()) + if (search_paths.empty()) { - LLUICtrlFactory::instance().pushFileName(full_filename); - LLSimpleXUIParser parser; - parser.readXUI(full_filename, block); + return; + } + + // "en" version, the default-language version of the file. + std::string base_filename = search_paths.front(); + if (!base_filename.empty()) + { + LLUICtrlFactory::instance().pushFileName(base_filename); + + if (!LLXMLNode::getLayeredXMLNode(root_node, search_paths)) + { + LL_WARNS() << "Couldn't parse widget from: " << base_filename << LL_ENDL; + return; + } + LLXUIParser parser; + parser.readXUI(root_node, block, base_filename); LLUICtrlFactory::instance().popFileName(); } } |