mirror of https://github.com/odrling/Aegisub
parent
e091763052
commit
5942928b45
|
@ -237,6 +237,7 @@ void HunspellSpellChecker::SetLanguage(wxString language) {
|
||||||
if (language.IsEmpty()) return;
|
if (language.IsEmpty()) return;
|
||||||
|
|
||||||
// Get dir name
|
// Get dir name
|
||||||
|
//FIXME: this should use ?user instead of ?data; however, since it apparently works already on win32, I'm not gonna mess with it right now :p
|
||||||
wxString path = DecodeRelativePath(Options.AsText(_T("Dictionaries path")),StandardPaths::DecodePath(_T("?data/"))) + _T("/");
|
wxString path = DecodeRelativePath(Options.AsText(_T("Dictionaries path")),StandardPaths::DecodePath(_T("?data/"))) + _T("/");
|
||||||
wxString userPath = StandardPaths::DecodePath(_T("?user/dictionaries/user_"));
|
wxString userPath = StandardPaths::DecodePath(_T("?user/dictionaries/user_"));
|
||||||
|
|
||||||
|
@ -245,6 +246,8 @@ void HunspellSpellChecker::SetLanguage(wxString language) {
|
||||||
dicpath = path + language + _T(".dic");
|
dicpath = path + language + _T(".dic");
|
||||||
usrdicpath = userPath + language + _T(".dic");
|
usrdicpath = userPath + language + _T(".dic");
|
||||||
|
|
||||||
|
printf("Using dictionary %ls for spellchecking\n", dicpath.c_str());
|
||||||
|
|
||||||
// Check if language is available
|
// Check if language is available
|
||||||
if (!wxFileExists(affpath) || !wxFileExists(dicpath)) return;
|
if (!wxFileExists(affpath) || !wxFileExists(dicpath)) return;
|
||||||
|
|
||||||
|
|
|
@ -691,6 +691,11 @@ void SubsTextEditCtrl::StyleSpellCheck(int start, int len) {
|
||||||
SetUnicodeStyling(s,e-s,32);
|
SetUnicodeStyling(s,e-s,32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// It seems like wxStyledTextCtrl wants you to finish styling at the end of the text.
|
||||||
|
// I don't really understand why, it's not documented anywhere I can find, but this fixes bug #595.
|
||||||
|
StartUnicodeStyling(text.Length(), 0);
|
||||||
|
SetUnicodeStyling(text.Length(), 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue