diff options
author | thickbrick | 2010-09-28 18:06:43 +0200 |
---|---|---|
committer | thickbrick | 2010-09-28 18:06:43 +0200 |
commit | 13b1fd24af265af8eb14585121958bf1e4bc89fd (patch) | |
tree | c3165ceda466531fb27dc6ae3169deb4fba65e81 /linden/indra/newview | |
parent | Fixed typo causing menu seperator to not hide. (diff) | |
download | meta-impy-13b1fd24af265af8eb14585121958bf1e4bc89fd.zip meta-impy-13b1fd24af265af8eb14585121958bf1e4bc89fd.tar.gz meta-impy-13b1fd24af265af8eb14585121958bf1e4bc89fd.tar.bz2 meta-impy-13b1fd24af265af8eb14585121958bf1e4bc89fd.tar.xz |
Context menu translator:
- Don't hide the translate menu, instead only enable the options
that make sense in the context (translate languages,
copy/paste/etc.)
- Made highlighting misspellings a global option, with immediate
effect.
- Convert newview/lgghunspell_wrapper.cpp to UTF-8.
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/lgghunspell_wrapper.cpp | 18 | ||||
-rw-r--r-- | linden/indra/newview/lgghunspell_wrapper.h | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/linden/indra/newview/lgghunspell_wrapper.cpp b/linden/indra/newview/lgghunspell_wrapper.cpp index f800043..aa4507c 100644 --- a/linden/indra/newview/lgghunspell_wrapper.cpp +++ b/linden/indra/newview/lgghunspell_wrapper.cpp | |||
@@ -72,7 +72,7 @@ static char * countryCodesraw[] = { | |||
72 | (char*)"CF",(char*)"Central African Republic", | 72 | (char*)"CF",(char*)"Central African Republic", |
73 | (char*)"CG",(char*)"Congo", | 73 | (char*)"CG",(char*)"Congo", |
74 | (char*)"CH",(char*)"Switzerland", | 74 | (char*)"CH",(char*)"Switzerland", |
75 | (char*)"CI",(char*)"Côte D'ivoire (Ivory Coast)", | 75 | (char*)"CI",(char*)"Côte D'ivoire (Ivory Coast)", |
76 | (char*)"CK",(char*)"Cook Iislands", | 76 | (char*)"CK",(char*)"Cook Iislands", |
77 | (char*)"CL",(char*)"Chile", | 77 | (char*)"CL",(char*)"Chile", |
78 | (char*)"CM",(char*)"Cameroon", | 78 | (char*)"CM",(char*)"Cameroon", |
@@ -212,7 +212,7 @@ static char * countryCodesraw[] = { | |||
212 | (char*)"PW",(char*)"Palau", | 212 | (char*)"PW",(char*)"Palau", |
213 | (char*)"PY",(char*)"Paraguay", | 213 | (char*)"PY",(char*)"Paraguay", |
214 | (char*)"QA",(char*)"Qatar", | 214 | (char*)"QA",(char*)"Qatar", |
215 | (char*)"RE",(char*)"Réunion", | 215 | (char*)"RE",(char*)"Réunion", |
216 | (char*)"RO",(char*)"Romania", | 216 | (char*)"RO",(char*)"Romania", |
217 | (char*)"RU",(char*)"Russian Federation", | 217 | (char*)"RU",(char*)"Russian Federation", |
218 | (char*)"RW",(char*)"Rwanda", | 218 | (char*)"RW",(char*)"Rwanda", |
@@ -333,7 +333,7 @@ static char * languageCodesraw[]={ | |||
333 | (char*)"ga",(char*)"Irish", | 333 | (char*)"ga",(char*)"Irish", |
334 | (char*)"gd",(char*)"Gaelic", | 334 | (char*)"gd",(char*)"Gaelic", |
335 | (char*)"gl",(char*)"Galician", | 335 | (char*)"gl",(char*)"Galician", |
336 | (char*)"gn",(char*)"Guaraní", | 336 | (char*)"gn",(char*)"GuaranÃ", |
337 | (char*)"gu",(char*)"Gujarati", | 337 | (char*)"gu",(char*)"Gujarati", |
338 | (char*)"gv",(char*)"Manx", | 338 | (char*)"gv",(char*)"Manx", |
339 | (char*)"ha",(char*)"Hausa", | 339 | (char*)"ha",(char*)"Hausa", |
@@ -456,7 +456,7 @@ static char * languageCodesraw[]={ | |||
456 | (char*)"uz",(char*)"Uzbek", | 456 | (char*)"uz",(char*)"Uzbek", |
457 | (char*)"ve",(char*)"Venda", | 457 | (char*)"ve",(char*)"Venda", |
458 | (char*)"vi",(char*)"Vietnamese", | 458 | (char*)"vi",(char*)"Vietnamese", |
459 | (char*)"vo",(char*)"Volapük", | 459 | (char*)"vo",(char*)"Volapük", |
460 | (char*)"wa",(char*)"Walloon", | 460 | (char*)"wa",(char*)"Walloon", |
461 | (char*)"wo",(char*)"Wolof", | 461 | (char*)"wo",(char*)"Wolof", |
462 | (char*)"xh",(char*)"Xhosa", | 462 | (char*)"xh",(char*)"Xhosa", |
@@ -470,10 +470,9 @@ static char * languageCodesraw[]={ | |||
470 | #define LANGUAGE_CODES_RAW_SIZE 368 | 470 | #define LANGUAGE_CODES_RAW_SIZE 368 |
471 | 471 | ||
472 | lggHunSpell_Wrapper::lggHunSpell_Wrapper() | 472 | lggHunSpell_Wrapper::lggHunSpell_Wrapper() |
473 | : | ||
474 | mSpellCheckHighlight(false) | ||
475 | { | 473 | { |
476 | //languageCodes(begin(languageCodesraw), end(languageCodesraw)); | 474 | //languageCodes(begin(languageCodesraw), end(languageCodesraw)); |
475 | mSpellCheckHighlight = rebind_llcontrol<BOOL>("EmeraldSpellDisplay", &gSavedSettings, false); | ||
477 | } | 476 | } |
478 | 477 | ||
479 | lggHunSpell_Wrapper::~lggHunSpell_Wrapper() | 478 | lggHunSpell_Wrapper::~lggHunSpell_Wrapper() |
@@ -638,8 +637,6 @@ void lggHunSpell_Wrapper::processSettings() | |||
638 | //expects everything to already be in saved settings | 637 | //expects everything to already be in saved settings |
639 | //this will also reload and read the installed dicts | 638 | //this will also reload and read the installed dicts |
640 | setNewDictionary(gSavedSettings.getString("EmeraldSpellBase")); | 639 | setNewDictionary(gSavedSettings.getString("EmeraldSpellBase")); |
641 | mSpellCheckHighlight = gSavedSettings.getBOOL("EmeraldSpellDisplay"); | ||
642 | |||
643 | } | 640 | } |
644 | 641 | ||
645 | void lggHunSpell_Wrapper::addDictionary(std::string additionalDictionary) | 642 | void lggHunSpell_Wrapper::addDictionary(std::string additionalDictionary) |
@@ -966,5 +963,8 @@ void lggHunSpell_Wrapper::editCustomButton() | |||
966 | 963 | ||
967 | void lggHunSpell_Wrapper::setSpellCheckHighlight(BOOL highlight) | 964 | void lggHunSpell_Wrapper::setSpellCheckHighlight(BOOL highlight) |
968 | { | 965 | { |
969 | mSpellCheckHighlight = highlight; | 966 | if (mSpellCheckHighlight) |
967 | { | ||
968 | *mSpellCheckHighlight = highlight; | ||
969 | } | ||
970 | } | 970 | } |
diff --git a/linden/indra/newview/lgghunspell_wrapper.h b/linden/indra/newview/lgghunspell_wrapper.h index b5f3ddb..71b2f14 100644 --- a/linden/indra/newview/lgghunspell_wrapper.h +++ b/linden/indra/newview/lgghunspell_wrapper.h | |||
@@ -55,7 +55,7 @@ public: | |||
55 | std::string VEC2CSV(std::vector<std::string> vec); | 55 | std::string VEC2CSV(std::vector<std::string> vec); |
56 | 56 | ||
57 | void setSpellCheckHighlight(BOOL highlight); | 57 | void setSpellCheckHighlight(BOOL highlight); |
58 | BOOL getSpellCheckHighlight() { return mSpellCheckHighlight; } | 58 | BOOL getSpellCheckHighlight() { return mSpellCheckHighlight && *mSpellCheckHighlight; } |
59 | 59 | ||
60 | private: | 60 | private: |
61 | void createCustomDic(); | 61 | void createCustomDic(); |
@@ -67,7 +67,7 @@ private: | |||
67 | std::string currentBaseDic; | 67 | std::string currentBaseDic; |
68 | //std::vector<std::string> languageCodes; | 68 | //std::vector<std::string> languageCodes; |
69 | //std::vector<std::string> countryCodes; | 69 | //std::vector<std::string> countryCodes; |
70 | BOOL mSpellCheckHighlight; | 70 | BOOL* mSpellCheckHighlight; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | extern lggHunSpell_Wrapper* glggHunSpell; // the singleton hunspell wrapper | 73 | extern lggHunSpell_Wrapper* glggHunSpell; // the singleton hunspell wrapper |