diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 7c26308a14..41e5279bd3 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1054,7 +1054,7 @@ bool wxTextCtrl::EnableProofCheck(const wxTextProofOptions& options) gspell_entry_set_inline_spell_checking(spell, options.IsSpellCheckEnabled()); } - return GetProofCheckOptions().IsSpellCheckEnabled(); + return GetProofCheckOptions().IsSpellCheckEnabled() == options.IsSpellCheckEnabled(); } wxTextProofOptions wxTextCtrl::GetProofCheckOptions() const @@ -1065,16 +1065,24 @@ wxTextProofOptions wxTextCtrl::GetProofCheckOptions() const { GtkTextView *textview = GTK_TEXT_VIEW(m_text); - if ( textview && gspell_text_view_get_from_gtk_text_view(textview) ) - opts.SpellCheck(); + if ( textview ) + { + GspellTextView *spell = gspell_text_view_get_from_gtk_text_view (textview); + if ( spell && gspell_text_view_get_inline_spell_checking(spell) ) + opts.SpellCheck(); + } } else { GtkEntry *entry = GTK_ENTRY(m_text); - if ( entry && gspell_entry_get_from_gtk_entry(entry) ) - opts.SpellCheck(); + if ( entry ) + { + GspellEntry *spell = gspell_entry_get_from_gtk_entry(entry); + if ( spell && gspell_entry_get_inline_spell_checking(spell) ) + opts.SpellCheck(); + } } return opts; diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 6f15bb6284..c46f40cf91 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -878,7 +878,7 @@ bool wxTextCtrl::EnableProofCheck(const wxTextProofOptions& options) ::SendMessage(GetHwnd(), EM_SETLANGOPTIONS, 0, langOptions); - return GetProofCheckOptions().IsSpellCheckEnabled(); + return GetProofCheckOptions().IsSpellCheckEnabled() == options.IsSpellCheckEnabled(); } wxTextProofOptions wxTextCtrl::GetProofCheckOptions() const