summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrlfactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lluictrlfactory.h')
-rw-r--r--indra/llui/lluictrlfactory.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index b1fa6add67..dc43b311a7 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -170,7 +170,9 @@ public:
// Returns 0 on success
S32 saveToXML(LLView* viewp, const std::string& filename);
- std::string getCurFileName() { return mFileNames.empty() ? "" : mFileNames.back(); }
+ std::string getCurFileName();
+ void pushFileName(const std::string& name);
+ void popFileName();
static BOOL getAttributeColor(LLXMLNodePtr node, const std::string& name, LLColor4& color);
@@ -180,7 +182,7 @@ public:
void popFactoryFunctions();
template<typename T>
- static T* createWidget(typename T::Params& params, LLView* parent = NULL)
+ static T* createWidget(const typename T::Params& params, LLView* parent = NULL)
{
T* widget = NULL;
@@ -229,7 +231,7 @@ public:
T* widget = NULL;
std::string skinned_filename = findSkinnedFilename(filename);
- getInstance()->mFileNames.push_back(skinned_filename);
+ instance().pushFileName(filename);
{
LLXMLNodePtr root_node;
@@ -263,7 +265,7 @@ public:
}
}
fail:
- getInstance()->mFileNames.pop_back();
+ instance().popFileName();
return widget;
}
@@ -371,8 +373,9 @@ LLChildRegistry<DERIVED>::Register<T>::Register(const char* tag, LLWidgetCreator
LLUICtrlFactory::instance().registerWidget(&typeid(T), &typeid(typename T::Params), &LLUICtrlFactory::createDefaultWidget<T>, tag);
// since registry_t depends on T, do this in line here
- typedef typename T::child_registry_t registry_t;
- LLChildRegistryRegistry::instance().defaultRegistrar().add(&typeid(T), registry_t::instance());
+ // TODO: uncomment this for schema generation
+ //typedef typename T::child_registry_t registry_t;
+ //LLChildRegistryRegistry::instance().defaultRegistrar().add(&typeid(T), registry_t::instance());
}