mirror of https://github.com/odrling/Aegisub
Added a #WITH_OLD_HUNSPELL option on config.h to let Hunspell use Hunspell::put_word() instead of Hunspell:AddWord().
Originally committed to SVN as r1733.
This commit is contained in:
parent
3b10cbd3c8
commit
a3c8e61f16
|
@ -132,7 +132,11 @@ void HunspellSpellChecker::AddWord(wxString word) {
|
|||
if (!hunspell) return;
|
||||
|
||||
// Add to currently loaded file
|
||||
#ifdef WITH_OLD_HUNSPELL
|
||||
hunspell->put_word(word.mb_str(*conv));
|
||||
#else
|
||||
hunspell->add(word.mb_str(*conv));
|
||||
#endif
|
||||
|
||||
// Ensure that the path exists
|
||||
wxFileName fn(usrdicpath);
|
||||
|
@ -296,7 +300,11 @@ void HunspellSpellChecker::SetLanguage(wxString language) {
|
|||
wxString curLine = textIn.ReadLine();
|
||||
curLine.Trim();
|
||||
if (curLine.IsEmpty() || curLine.IsNumber()) continue;
|
||||
#ifdef WITH_OLD_HUNSPELL
|
||||
hunspell->put_word(curLine.mb_str(*conv));
|
||||
#else
|
||||
hunspell->add(curLine.mb_str(*conv));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,10 @@
|
|||
|
||||
// Enable Hunspell-based spellchecker
|
||||
// Requires: hunspell (in repository for Win32)
|
||||
// If you have an old version of Hunspell (that uses Hunspell::put_word() instead of Hunspell::add()),
|
||||
// uncomment the second line as well.
|
||||
//#define WITH_HUNSPELL
|
||||
//#define WITH_OLD_HUNSPELL
|
||||
|
||||
|
||||
/////////////// LOW PRIORITY ////////////
|
||||
|
|
Loading…
Reference in New Issue