aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llxml
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:29 -0500
committerJacek Antonelli2008-08-15 23:45:29 -0500
commit7bdb4845afdd157f95281293803567090e3f992a (patch)
treefbcada1c227d7407f9f37ccba360bfe6326d9c5e /linden/indra/llxml
parentSecond Life viewer sources 1.19.0.0 (diff)
downloadmeta-impy-7bdb4845afdd157f95281293803567090e3f992a.zip
meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.gz
meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.bz2
meta-impy-7bdb4845afdd157f95281293803567090e3f992a.tar.xz
Second Life viewer sources 1.19.0.2
Diffstat (limited to 'linden/indra/llxml')
-rw-r--r--linden/indra/llxml/llcontrol.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/linden/indra/llxml/llcontrol.cpp b/linden/indra/llxml/llcontrol.cpp
index b97498d..b9fa8ff 100644
--- a/linden/indra/llxml/llcontrol.cpp
+++ b/linden/indra/llxml/llcontrol.cpp
@@ -1235,12 +1235,25 @@ void LLControlGroup::resetToDefaults()
1235} 1235}
1236 1236
1237//============================================================================ 1237//============================================================================
1238// FIrst-use 1238// First-use
1239 1239
1240static LLString get_warn_name(const LLString& name)
1241{
1242 LLString warnname = "Warn" + name;
1243 for (LLString::iterator iter = warnname.begin(); iter != warnname.end(); ++iter)
1244 {
1245 char c = *iter;
1246 if (!isalnum(c))
1247 {
1248 *iter = '_';
1249 }
1250 }
1251 return warnname;
1252}
1240 1253
1241void LLControlGroup::addWarning(const LLString& name) 1254void LLControlGroup::addWarning(const LLString& name)
1242{ 1255{
1243 LLString warnname = "Warn" + name; 1256 LLString warnname = get_warn_name(name);
1244 if(!mNameTable[warnname]) 1257 if(!mNameTable[warnname])
1245 { 1258 {
1246 LLString comment = LLString("Enables ") + name + LLString(" warning dialog"); 1259 LLString comment = LLString("Enables ") + name + LLString(" warning dialog");
@@ -1251,13 +1264,13 @@ void LLControlGroup::addWarning(const LLString& name)
1251 1264
1252BOOL LLControlGroup::getWarning(const LLString& name) 1265BOOL LLControlGroup::getWarning(const LLString& name)
1253{ 1266{
1254 LLString warnname = "Warn" + name; 1267 LLString warnname = get_warn_name(name);
1255 return getBOOL(warnname); 1268 return getBOOL(warnname);
1256} 1269}
1257 1270
1258void LLControlGroup::setWarning(const LLString& name, BOOL val) 1271void LLControlGroup::setWarning(const LLString& name, BOOL val)
1259{ 1272{
1260 LLString warnname = "Warn" + name; 1273 LLString warnname = get_warn_name(name);
1261 setBOOL(warnname, val); 1274 setBOOL(warnname, val);
1262} 1275}
1263 1276