From 394b28ce77e5e51c41c1d3d9ca9896812f404810 Mon Sep 17 00:00:00 2001 From: Austin Doupnik Date: Thu, 9 Jul 2009 00:59:52 +0000 Subject: DEV-35112 Renamed colors_def.xml to colors.xml. Reviewed by Richard. --- indra/llui/lluicolortable.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'indra/llui') 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); -- cgit v1.2.3