summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2012-02-09 22:02:32 +0100
committerKitty Barnett <develop@catznip.com>2012-02-09 22:02:32 +0100
commite615660823e680e824d2db0f1a59917597e64a13 (patch)
tree2fa3f0dda243312b4b0b9f0871f1848dfb49d2a4 /indra
parent9c792e337695b904e4f52fce83b293a2e97fdeaf (diff)
STORM-276 Differentiate between primary and secondary dictionaries
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llspellcheck.cpp6
-rwxr-xr-xindra/newview/llfloaterpreference.cpp2
2 files changed, 3 insertions, 5 deletions
diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp
index 46df44cdba..aa39e21a96 100644
--- a/indra/llui/llspellcheck.cpp
+++ b/indra/llui/llspellcheck.cpp
@@ -122,9 +122,7 @@ void LLSpellChecker::refreshDictionaryMap()
tmp_app_path = (sdDict.has("name")) ? app_path + sdDict["name"].asString() : LLStringUtil::null;
tmp_user_path = (sdDict.has("name")) ? user_path + sdDict["name"].asString() : LLStringUtil::null;
sdDict["installed"] =
- (!tmp_app_path.empty()) &&
- ( ((gDirUtilp->fileExists(tmp_user_path + ".aff")) && (gDirUtilp->fileExists(tmp_user_path + ".dic"))) ||
- ((gDirUtilp->fileExists(tmp_app_path + ".aff")) && (gDirUtilp->fileExists(tmp_app_path + ".dic"))) );
+ (!tmp_app_path.empty()) && ((gDirUtilp->fileExists(tmp_user_path + ".dic")) || (gDirUtilp->fileExists(tmp_app_path + ".dic")));
sdDict["has_custom"] = (!tmp_user_path.empty()) && (gDirUtilp->fileExists(tmp_user_path + DICT_CUSTOM_SUFFIX + ".dic"));
sdDict["has_ignore"] = (!tmp_user_path.empty()) && (gDirUtilp->fileExists(tmp_user_path + DICT_IGNORE_SUFFIX + ".dic"));
}
@@ -243,7 +241,7 @@ void LLSpellChecker::initHunspell(const std::string& dict_name)
}
const LLSD dict_entry = (!dict_name.empty()) ? getDictionaryData(dict_name) : LLSD();
- if ( (!dict_entry.isDefined()) || (!dict_entry["installed"].asBoolean()) )
+ if ( (!dict_entry.isDefined()) || (!dict_entry["installed"].asBoolean()) || (!dict_entry["is_primary"].asBoolean()))
{
sSettingsChangeSignal();
return;
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index c41488ce91..c444d2bb6f 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -997,7 +997,7 @@ void LLFloaterPreference::refreshDictLists(bool from_settings)
for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it)
{
const LLSD& dict = *dict_it;
- if ( (dict["installed"].asBoolean()) && (dict.has("language")) )
+ if ( (dict["installed"].asBoolean()) && (dict["is_primary"].asBoolean()) && (dict.has("language")) )
dict_combo->add(dict["language"].asString());
}
if (!dict_combo->selectByValue(dict_cur))