aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lgghunspell_wrapper.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-09-02 02:01:19 -0700
committerMcCabe Maxsted2010-09-02 02:01:19 -0700
commitf05952205fe5d861ce272ef377bc5ad96284d577 (patch)
tree9283454a46999728930b8524e06ebca541828828 /linden/indra/newview/lgghunspell_wrapper.cpp
parentFixed layout of Local Chat window (diff)
downloadmeta-impy-f05952205fe5d861ce272ef377bc5ad96284d577.zip
meta-impy-f05952205fe5d861ce272ef377bc5ad96284d577.tar.gz
meta-impy-f05952205fe5d861ce272ef377bc5ad96284d577.tar.bz2
meta-impy-f05952205fe5d861ce272ef377bc5ad96284d577.tar.xz
Removed broken edit button from spell check prefs, added a new debug setting DicDownloadBaseURL
Diffstat (limited to 'linden/indra/newview/lgghunspell_wrapper.cpp')
-rw-r--r--linden/indra/newview/lgghunspell_wrapper.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/linden/indra/newview/lgghunspell_wrapper.cpp b/linden/indra/newview/lgghunspell_wrapper.cpp
index ff5a3d0..5879bac 100644
--- a/linden/indra/newview/lgghunspell_wrapper.cpp
+++ b/linden/indra/newview/lgghunspell_wrapper.cpp
@@ -503,7 +503,7 @@ void lggHunSpell_Wrapper::setNewDictionary(std::string newDict)
503 myHunspell = new Hunspell(dicaffpath.c_str(),dicdicpath.c_str()); 503 myHunspell = new Hunspell(dicaffpath.c_str(),dicdicpath.c_str());
504 llinfos << "Adding custom dictionary " << llendl; 504 llinfos << "Adding custom dictionary " << llendl;
505 createCustomDic(); 505 createCustomDic();
506 addDictionary("emerald_custom"); 506 addDictionary("custom");
507 std::vector<std::string> toInstall = getInstalledDicts(); 507 std::vector<std::string> toInstall = getInstalledDicts();
508 for(int i =0;i<(int)toInstall.size();i++) 508 for(int i =0;i<(int)toInstall.size();i++)
509 addDictionary(toInstall[i]); 509 addDictionary(toInstall[i]);
@@ -513,7 +513,7 @@ void lggHunSpell_Wrapper::setNewDictionary(std::string newDict)
513void lggHunSpell_Wrapper::createCustomDic() 513void lggHunSpell_Wrapper::createCustomDic()
514{ 514{
515 std::string filename(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, 515 std::string filename(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,
516 "dictionaries", "emerald_custom.dic")); 516 "dictionaries", "custom.dic"));
517 if(!gDirUtilp->fileExists(filename)) 517 if(!gDirUtilp->fileExists(filename))
518 { 518 {
519 llofstream export_file; 519 llofstream export_file;
@@ -527,7 +527,7 @@ void lggHunSpell_Wrapper::addWordToCustomDictionary(std::string wordToAdd)
527{ 527{
528 if(!myHunspell)return; 528 if(!myHunspell)return;
529 myHunspell->add(wordToAdd.c_str()); 529 myHunspell->add(wordToAdd.c_str());
530 std::string filename(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", "emerald_custom.dic")); 530 std::string filename(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", "custom.dic"));
531 std::vector<std::string> lines; 531 std::vector<std::string> lines;
532 if(gDirUtilp->fileExists(filename)) 532 if(gDirUtilp->fileExists(filename))
533 { 533 {
@@ -847,7 +847,7 @@ void lggHunSpell_Wrapper::getMoreButton(void * data)
847{ 847{
848 std::vector<std::string> shortNames; 848 std::vector<std::string> shortNames;
849 std::vector<std::string> longNames; 849 std::vector<std::string> longNames;
850 LLSD response = LLHTTPClient::blockingGet("http://www.imprudenceviewer.org/app/dics/dic_list.xml"); 850 LLSD response = LLHTTPClient::blockingGet(gSavedSettings.getString("DicDownloadBaseURL")+"dic_list.xml");
851 if(response.has("body")) 851 if(response.has("body"))
852 { 852 {
853 const LLSD &dict_list = response["body"]; 853 const LLSD &dict_list = response["body"];
@@ -866,16 +866,14 @@ void lggHunSpell_Wrapper::getMoreButton(void * data)
866} 866}
867void lggHunSpell_Wrapper::editCustomButton() 867void lggHunSpell_Wrapper::editCustomButton()
868{ 868{
869 std::string dicdicpath(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", std::string("emerald_custom.dic")).c_str()); 869 std::string dicdicpath(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", std::string("custom.dic")).c_str());
870 870
871 std::vector<std::string> lines;
872
873 if(!gDirUtilp->fileExists(dicdicpath)) 871 if(!gDirUtilp->fileExists(dicdicpath))
874 { 872 {
875 createCustomDic(); 873 createCustomDic();
876 //glggHunSpell->addWordToCustomDictionary("temp"); 874 //glggHunSpell->addWordToCustomDictionary("temp");
877 } 875 }
878 876
879 gViewerWindow->getWindow()->ShellEx(dicdicpath); 877 gViewerWindow->getWindow()->ShellEx(dicdicpath);
880} 878}
881 879