From fa887f51c12cb2e66e888c4563bcf7e6f287c86e Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 14 Jun 2007 22:14:09 +0000 Subject: [PATCH] making spell checking selectable via system options, Bug 1736428 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/textctrl.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 252f08aa56..8cc71df32a 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -1798,9 +1798,18 @@ void wxMacMLTEControl::AdjustCreationAttributes( const wxColour &background, boo | kTXNSupportFontCommandUpdating; // only spell check when not read-only - // todo : use system options for the other cases - bool checkSpelling = !(m_windowStyle & wxTE_READONLY); - + // use system options for the default + bool checkSpelling = false ; + if ( !(m_windowStyle & wxTE_READONLY) ) + { +#if wxUSE_SYSTEM_OPTIONS + if ( wxSystemOptions::HasOption( wxMAC_TEXTCONTROL_USE_SPELL_CHECKER ) && (wxSystemOptions::GetOptionInt( wxMAC_TEXTCONTROL_USE_SPELL_CHECKER ) == 1) ) + { + checkSpelling = true ; + } +#endif + } + if ( checkSpelling ) options |= kTXNSupportSpellCheckCommandProcessing