Switch to using GSpell for wxTextCtrl proof checker in wxGTK

Use GSpell rather than GtkSpell because GSpell also allows to check
single line text controls.

Closes https://github.com/wxWidgets/wxWidgets/pull/2516
This commit is contained in:
Iwbnwif Yiw
2021-09-08 21:02:44 +01:00
committed by Vadim Zeitlin
parent 0fd138a4e7
commit 5ba2461fd1
6 changed files with 83 additions and 68 deletions

View File

@@ -1123,6 +1123,16 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
m_text->SetInsertionPoint(0);
m_text->WriteText( "Prepended. " );
#if wxUSE_SPELLCHECK
if ( m_text->EnableProofCheck(wxTextProofOptions::Default()) )
{
// Break the string in several parts to avoid misspellings in the sources.
(*m_text) << " Mis"
"s"
"spelled.";
}
#endif
m_password = new MyTextCtrl( this, wxID_ANY, "",
wxPoint(10,50), wxSize(140,wxDefaultCoord), wxTE_PASSWORD );
m_password->SetHint("Don't use 12345 here");
@@ -1221,7 +1231,6 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
}
else
{
// Break the string in several parts to avoid misspellings in the sources.
(*m_enter) << "Spell checking is enabled, mis"
"s"
"spelled words should be highlighted.";