diff options
author | McCabe Maxsted | 2010-09-02 02:01:19 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-09-02 02:01:19 -0700 |
commit | f05952205fe5d861ce272ef377bc5ad96284d577 (patch) | |
tree | 9283454a46999728930b8524e06ebca541828828 | |
parent | Fixed layout of Local Chat window (diff) | |
download | meta-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
4 files changed, 26 insertions, 16 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index f096811..894473b 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -1537,6 +1537,17 @@ | |||
1537 | 1537 | ||
1538 | <!-- Begin: Spellcheck & Translation --> | 1538 | <!-- Begin: Spellcheck & Translation --> |
1539 | 1539 | ||
1540 | <key>DicDownloadBaseURL</key> | ||
1541 | <map> | ||
1542 | <key>Comment</key> | ||
1543 | <string>Base url for download dictionaries</string> | ||
1544 | <key>Persist</key> | ||
1545 | <integer>1</integer> | ||
1546 | <key>Type</key> | ||
1547 | <string>String</string> | ||
1548 | <key>Value</key> | ||
1549 | <string>http://www.imprudenceviewer.org/app/dics/</string> | ||
1550 | </map> | ||
1540 | <key>EmeraldEnableAutoCorrect</key> | 1551 | <key>EmeraldEnableAutoCorrect</key> |
1541 | <map> | 1552 | <map> |
1542 | <key>Comment</key> | 1553 | <key>Comment</key> |
diff --git a/linden/indra/newview/lggdicdownload.cpp b/linden/indra/newview/lggdicdownload.cpp index bd383e2..5b8b13a 100644 --- a/linden/indra/newview/lggdicdownload.cpp +++ b/linden/indra/newview/lggdicdownload.cpp | |||
@@ -44,6 +44,7 @@ | |||
44 | #include "llcombobox.h" | 44 | #include "llcombobox.h" |
45 | #include "llview.h" | 45 | #include "llview.h" |
46 | #include "llprefsadvanced.h" | 46 | #include "llprefsadvanced.h" |
47 | #include "llviewercontrol.h" | ||
47 | #include "llhttpclient.h" | 48 | #include "llhttpclient.h" |
48 | #include "llbufferstream.h" | 49 | #include "llbufferstream.h" |
49 | 50 | ||
@@ -128,8 +129,8 @@ void lggDicDownloadFloater::onClickDownload(void* data) | |||
128 | { | 129 | { |
129 | index--; | 130 | index--; |
130 | std::string newDict(self->sNames[index]); | 131 | std::string newDict(self->sNames[index]); |
131 | LLHTTPClient::get("http://www.imprudenceviewer.org/app/dics/"+newDict+".aff", new EmeraldDicDownloader(self,newDict+".aff")); | 132 | LLHTTPClient::get(gSavedSettings.getString("DicDownloadBaseURL")+newDict+".aff", new EmeraldDicDownloader(self,newDict+".aff")); |
132 | LLHTTPClient::get("http://www.imprudenceviewer.org/app/dics/"+newDict+".dic", new EmeraldDicDownloader(NULL,newDict+".dic")); | 133 | LLHTTPClient::get(gSavedSettings.getString("DicDownloadBaseURL")+newDict+".dic", new EmeraldDicDownloader(NULL,newDict+".dic")); |
133 | 134 | ||
134 | LLButton* butt = self->getChild<LLButton>("Emerald_dic_download"); | 135 | LLButton* butt = self->getChild<LLButton>("Emerald_dic_download"); |
135 | if(butt) | 136 | if(butt) |
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) | |||
513 | void lggHunSpell_Wrapper::createCustomDic() | 513 | void 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 | } |
867 | void lggHunSpell_Wrapper::editCustomButton() | 867 | void 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 | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml index 74ea621..857d1f1 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml | |||
@@ -162,9 +162,9 @@ | |||
162 | <check_box bottom_delta="-50" enabled="true" follows="left|top" font="SansSerifSmall" height="16" | 162 | <check_box bottom_delta="-50" enabled="true" follows="left|top" font="SansSerifSmall" height="16" |
163 | label="Show misspelled words in red" left="5" mouse_opaque="true" name="EmeraldSpellDisplay" | 163 | label="Show misspelled words in red" left="5" mouse_opaque="true" name="EmeraldSpellDisplay" |
164 | control_name="EmeraldSpellDisplay" width="126"/> | 164 | control_name="EmeraldSpellDisplay" width="126"/> |
165 | <button bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="18" label="Edit Custom dictionary" | 165 | <!--<button bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="18" label="Edit Custom dictionary" |
166 | name="EmSpell_EditCustom" tool_tip="" left_delta="20" width="130"/> | 166 | name="EmSpell_EditCustom" tool_tip="" left_delta="20" width="130"/>--> |
167 | <text bottom_delta="20" follows="left|top" font="SansSerifSmall" height="16" left="250" | 167 | <text bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16" left="250" |
168 | name="EmSpell_txt4" width="512"> | 168 | name="EmSpell_txt4" width="512"> |
169 | To spellcheck, right click a misspelled word | 169 | To spellcheck, right click a misspelled word |
170 | (red or not) and click on its replacement | 170 | (red or not) and click on its replacement |