summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorAustin Doupnik <austin@lindenlab.com>2009-07-09 00:59:52 +0000
committerAustin Doupnik <austin@lindenlab.com>2009-07-09 00:59:52 +0000
commit394b28ce77e5e51c41c1d3d9ca9896812f404810 (patch)
tree1e19823d3804eaac70036d181973030398c8625f /indra/llui
parent163f89d77fc0ed76a8c1e79049842394f129d16b (diff)
DEV-35112 Renamed colors_def.xml to colors.xml. Reviewed by Richard.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lluicolortable.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index 0320e998d0..087a99c2b0 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -181,16 +181,16 @@ bool LLUIColorTable::loadFromSettings()
{
bool result = false;
- std::string default_filename = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "colors_def.xml");
+ std::string default_filename = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "colors.xml");
result |= loadFromFilename(default_filename);
- std::string current_filename = gDirUtilp->getExpandedFilename(LL_PATH_TOP_SKIN, "colors_def.xml");
+ std::string current_filename = gDirUtilp->getExpandedFilename(LL_PATH_TOP_SKIN, "colors.xml");
if(current_filename != default_filename)
{
result |= loadFromFilename(current_filename);
}
- std::string user_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors_def.xml");
+ std::string user_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors.xml");
loadFromFilename(user_filename);
return result;
@@ -216,7 +216,7 @@ void LLUIColorTable::saveUserSettings() const
if(!output_node->isNull())
{
- const std::string& filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors_def.xml");
+ const std::string& filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors.xml");
LLFILE *fp = LLFile::fopen(filename, "w");
if(fp != NULL)
@@ -271,6 +271,12 @@ bool LLUIColorTable::loadFromFilename(const std::string& filename)
return false;
}
+ if(!root->hasName("colors"))
+ {
+ llwarns << filename << " is not a valid color definition file" << llendl;
+ return false;
+ }
+
Params params;
LLXUIParser::instance().readXUI(root, params);