summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrlfactory.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-11-06 16:37:51 -0500
committerNat Goodspeed <nat@lindenlab.com>2012-11-06 16:37:51 -0500
commit55a812ca7797ec1b857e95254fde1fa75bd92d06 (patch)
treec15fdb992af40162cc5adb3c25257f3ba1f069a1 /indra/llui/lluictrlfactory.h
parentbf6d1670756ba96abde570e7dbbf94c62c71ca5b (diff)
parenta9ea41003587e2411c7247f84ea04df2a686552b (diff)
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/llui/lluictrlfactory.h')
-rw-r--r--indra/llui/lluictrlfactory.h31
1 files changed, 9 insertions, 22 deletions
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 4e54354731..f6971261d7 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -32,6 +32,7 @@
#include "llregistry.h"
#include "llxuiparser.h"
#include "llstl.h"
+#include "lldir.h"
class LLView;
@@ -161,32 +162,21 @@ public:
LLView* createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t&, LLXMLNodePtr output_node );
template<typename T>
- static T* createFromFile(const std::string &filename, LLView *parent, const widget_registry_t& registry, LLXMLNodePtr output_node = NULL)
+ static T* createFromFile(const std::string &filename, LLView *parent, const widget_registry_t& registry)
{
T* widget = NULL;
-
- std::string skinned_filename = findSkinnedFilename(filename);
+
instance().pushFileName(filename);
{
LLXMLNodePtr root_node;
- //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_node))
- {
- llwarns << "Couldn't parse XUI file: " << filename << llendl;
- goto fail;
- }
- }
- else if (!LLUICtrlFactory::getLayeredXMLNode(filename, root_node))
+ if (!LLUICtrlFactory::getLayeredXMLNode(filename, root_node))
{
- llwarns << "Couldn't parse XUI file: " << skinned_filename << llendl;
+ llwarns << "Couldn't parse XUI file: " << instance().getCurFileName() << llendl;
goto fail;
}
-
- LLView* view = getInstance()->createFromXML(root_node, parent, filename, registry, output_node);
+
+ LLView* view = getInstance()->createFromXML(root_node, parent, filename, registry, NULL);
if (view)
{
widget = dynamic_cast<T*>(view);
@@ -214,8 +204,8 @@ fail:
static void createChildren(LLView* viewp, LLXMLNodePtr node, const widget_registry_t&, LLXMLNodePtr output_node = NULL);
- static bool getLayeredXMLNode(const std::string &filename, LLXMLNodePtr& root);
- static bool getLocalizedXMLNode(const std::string &xui_filename, LLXMLNodePtr& root);
+ static bool getLayeredXMLNode(const std::string &filename, LLXMLNodePtr& root,
+ LLDir::ESkinConstraint constraint=LLDir::CURRENT_SKIN);
private:
//NOTE: both friend declarations are necessary to keep both gcc and msvc happy
@@ -300,9 +290,6 @@ private:
// this exists to get around dependency on llview
static void setCtrlParent(LLView* view, LLView* parent, S32 tab_group);
- // Avoid directly using LLUI and LLDir in the template code
- static std::string findSkinnedFilename(const std::string& filename);
-
class LLPanel* mDummyPanel;
std::vector<std::string> mFileNames;
};