Always set wxUSE_SPELLCHECK to 1 by default for simplicity
It does no real harm to set it to 1 and this avoids the need for the platform checks in setup.h files, simplifying things (although it does require checking for GTK 3 in the code compiled for both GTK 2 and 3, as gtkspell library can only be used with GTK 3).
This commit is contained in:
@@ -216,11 +216,7 @@
|
||||
|
||||
#cmakedefine01 wxUSE_SECRETSTORE
|
||||
|
||||
#if (defined(__WXGTK3__) || defined(__WXMSW__))
|
||||
#cmakedefine01 wxUSE_SPELLCHECK
|
||||
#else
|
||||
#cmakedefine01 wxUSE_SPELLCHECK
|
||||
#endif
|
||||
|
||||
#cmakedefine01 wxUSE_STDPATHS
|
||||
|
||||
|
@@ -447,17 +447,13 @@
|
||||
// Recommended setting: 1 (but may be safely disabled if you don't use it)
|
||||
#define wxUSE_SECRETSTORE 1
|
||||
|
||||
// Allow the use of the OS built-in spellchecker on wxTextCtrl (multiline
|
||||
// only). Currently only wxGTK3 and wxMSW are implemented.
|
||||
// Allow the use of the OS built-in spell checker in wxTextCtrl.
|
||||
//
|
||||
// Default is 1 on wxGTK3 and wxMSW platforms and 0 otherwise.
|
||||
// Default is 1, the corresponding wxTextCtrl functions simply won't do
|
||||
// anything if the functionality is not supported by the current platform.
|
||||
//
|
||||
// Recommended setting: 1 on supported platforms.
|
||||
#if (defined(__WXGTK3__) || defined(__WXMSW__))
|
||||
// Recommended setting: 1 unless you want to save a tiny bit of code.
|
||||
#define wxUSE_SPELLCHECK 1
|
||||
#else
|
||||
#define wxUSE_SPELLCHECK 0
|
||||
#endif
|
||||
|
||||
// Use wxStandardPaths class which allows to retrieve some standard locations
|
||||
// in the file system
|
||||
|
@@ -448,17 +448,13 @@
|
||||
// Recommended setting: 1 (but may be safely disabled if you don't use it)
|
||||
#define wxUSE_SECRETSTORE 1
|
||||
|
||||
// Allow the use of the OS built-in spellchecker on wxTextCtrl (multiline
|
||||
// only). Currently only wxGTK3 and wxMSW are implemented.
|
||||
// Allow the use of the OS built-in spell checker in wxTextCtrl.
|
||||
//
|
||||
// Default is 1 on wxGTK3 and wxMSW platforms and 0 otherwise.
|
||||
// Default is 1, the corresponding wxTextCtrl functions simply won't do
|
||||
// anything if the functionality is not supported by the current platform.
|
||||
//
|
||||
// Recommended setting: 1 on supported platforms.
|
||||
#if (defined(__WXGTK3__) || defined(__WXMSW__))
|
||||
// Recommended setting: 1 unless you want to save a tiny bit of code.
|
||||
#define wxUSE_SPELLCHECK 1
|
||||
#else
|
||||
#define wxUSE_SPELLCHECK 0
|
||||
#endif
|
||||
|
||||
// Use wxStandardPaths class which allows to retrieve some standard locations
|
||||
// in the file system
|
||||
|
@@ -96,13 +96,13 @@ public:
|
||||
// Overridden wxWindow methods
|
||||
virtual void SetWindowStyleFlag( long style ) wxOVERRIDE;
|
||||
|
||||
#if wxUSE_SPELLCHECK
|
||||
#if wxUSE_SPELLCHECK && defined(__WXGTK3__)
|
||||
// Use native spelling and grammar checking functions.
|
||||
virtual bool EnableProofCheck(bool WXUNUSED(enable) = true,
|
||||
const wxTextProofOptions& WXUNUSED(options) =
|
||||
wxTextProofOptions()) wxOVERRIDE;
|
||||
virtual bool IsProofCheckEnabled() const wxOVERRIDE;
|
||||
#endif // wxUSE_SPELLCHECK
|
||||
#endif // wxUSE_SPELLCHECK && __WXGTK3__
|
||||
|
||||
// Implementation from now on
|
||||
void OnDropFiles( wxDropFilesEvent &event );
|
||||
|
@@ -448,17 +448,13 @@
|
||||
// Recommended setting: 1 (but may be safely disabled if you don't use it)
|
||||
#define wxUSE_SECRETSTORE 1
|
||||
|
||||
// Allow the use of the OS built-in spellchecker on wxTextCtrl (multiline
|
||||
// only). Currently only wxGTK3 and wxMSW are implemented.
|
||||
// Allow the use of the OS built-in spell checker in wxTextCtrl.
|
||||
//
|
||||
// Default is 1 on wxGTK3 and wxMSW platforms and 0 otherwise.
|
||||
// Default is 1, the corresponding wxTextCtrl functions simply won't do
|
||||
// anything if the functionality is not supported by the current platform.
|
||||
//
|
||||
// Recommended setting: 1 on supported platforms.
|
||||
#if (defined(__WXGTK3__) || defined(__WXMSW__))
|
||||
// Recommended setting: 1 unless you want to save a tiny bit of code.
|
||||
#define wxUSE_SPELLCHECK 1
|
||||
#else
|
||||
#define wxUSE_SPELLCHECK 0
|
||||
#endif
|
||||
|
||||
// Use wxStandardPaths class which allows to retrieve some standard locations
|
||||
// in the file system
|
||||
|
@@ -448,17 +448,13 @@
|
||||
// Recommended setting: 1 (but may be safely disabled if you don't use it)
|
||||
#define wxUSE_SECRETSTORE 1
|
||||
|
||||
// Allow the use of the OS built-in spellchecker on wxTextCtrl (multiline
|
||||
// only). Currently only wxGTK3 and wxMSW are implemented.
|
||||
// Allow the use of the OS built-in spell checker in wxTextCtrl.
|
||||
//
|
||||
// Default is 1 on wxGTK3 and wxMSW platforms and 0 otherwise.
|
||||
// Default is 1, the corresponding wxTextCtrl functions simply won't do
|
||||
// anything if the functionality is not supported by the current platform.
|
||||
//
|
||||
// Recommended setting: 1 on supported platforms.
|
||||
#if (defined(__WXGTK3__) || defined(__WXMSW__))
|
||||
// Recommended setting: 1 unless you want to save a tiny bit of code.
|
||||
#define wxUSE_SPELLCHECK 1
|
||||
#else
|
||||
#define wxUSE_SPELLCHECK 0
|
||||
#endif
|
||||
|
||||
// Use wxStandardPaths class which allows to retrieve some standard locations
|
||||
// in the file system
|
||||
|
@@ -454,17 +454,13 @@
|
||||
// Recommended setting: 1 (but may be safely disabled if you don't use it)
|
||||
#define wxUSE_SECRETSTORE 1
|
||||
|
||||
// Allow the use of the OS built-in spellchecker on wxTextCtrl (multiline
|
||||
// only). Currently only wxGTK3 and wxMSW are implemented.
|
||||
// Allow the use of the OS built-in spell checker in wxTextCtrl.
|
||||
//
|
||||
// Default is 1 on wxGTK3 and wxMSW platforms and 0 otherwise.
|
||||
// Default is 1, the corresponding wxTextCtrl functions simply won't do
|
||||
// anything if the functionality is not supported by the current platform.
|
||||
//
|
||||
// Recommended setting: 1 on supported platforms.
|
||||
#if (defined(__WXGTK3__) || defined(__WXMSW__))
|
||||
// Recommended setting: 1 unless you want to save a tiny bit of code.
|
||||
#define wxUSE_SPELLCHECK 1
|
||||
#else
|
||||
#define wxUSE_SPELLCHECK 0
|
||||
#endif
|
||||
|
||||
// Use wxStandardPaths class which allows to retrieve some standard locations
|
||||
// in the file system
|
||||
|
@@ -444,17 +444,13 @@
|
||||
// Recommended setting: 1 (but may be safely disabled if you don't use it)
|
||||
#define wxUSE_SECRETSTORE 1
|
||||
|
||||
// Allow the use of the OS built-in spellchecker on wxTextCtrl (multiline
|
||||
// only). Currently only wxGTK3 and wxMSW are implemented.
|
||||
// Allow the use of the OS built-in spell checker in wxTextCtrl.
|
||||
//
|
||||
// Default is 1 on wxGTK3 and wxMSW platforms and 0 otherwise.
|
||||
// Default is 1, the corresponding wxTextCtrl functions simply won't do
|
||||
// anything if the functionality is not supported by the current platform.
|
||||
//
|
||||
// Recommended setting: 1 on supported platforms.
|
||||
#if (defined(__WXGTK3__) || defined(__WXMSW__))
|
||||
// Recommended setting: 1 unless you want to save a tiny bit of code.
|
||||
#define wxUSE_SPELLCHECK 1
|
||||
#else
|
||||
#define wxUSE_SPELLCHECK 0
|
||||
#endif
|
||||
|
||||
// Use wxStandardPaths class which allows to retrieve some standard locations
|
||||
// in the file system
|
||||
|
@@ -447,17 +447,13 @@
|
||||
// Recommended setting: 1 (but may be safely disabled if you don't use it)
|
||||
#define wxUSE_SECRETSTORE 1
|
||||
|
||||
// Allow the use of the OS built-in spellchecker on wxTextCtrl (multiline
|
||||
// only). Currently only wxGTK3 and wxMSW are implemented.
|
||||
// Allow the use of the OS built-in spell checker in wxTextCtrl.
|
||||
//
|
||||
// Default is 1 on wxGTK3 and wxMSW platforms and 0 otherwise.
|
||||
// Default is 1, the corresponding wxTextCtrl functions simply won't do
|
||||
// anything if the functionality is not supported by the current platform.
|
||||
//
|
||||
// Recommended setting: 1 on supported platforms.
|
||||
#if (defined(__WXGTK3__) || defined(__WXMSW__))
|
||||
// Recommended setting: 1 unless you want to save a tiny bit of code.
|
||||
#define wxUSE_SPELLCHECK 1
|
||||
#else
|
||||
#define wxUSE_SPELLCHECK 0
|
||||
#endif
|
||||
|
||||
// Use wxStandardPaths class which allows to retrieve some standard locations
|
||||
// in the file system
|
||||
|
@@ -216,11 +216,7 @@
|
||||
|
||||
#define wxUSE_SECRETSTORE 0
|
||||
|
||||
#if (defined(__WXGTK3__) || defined(__WXMSW__))
|
||||
#define wxUSE_SPELLCHECK 0
|
||||
#else
|
||||
#define wxUSE_SPELLCHECK 0
|
||||
#endif
|
||||
|
||||
#define wxUSE_STDPATHS 0
|
||||
|
||||
|
@@ -32,11 +32,11 @@
|
||||
#include "wx/gtk/private.h"
|
||||
#include "wx/gtk/private/gtk3-compat.h"
|
||||
|
||||
#if wxUSE_SPELLCHECK
|
||||
#if wxUSE_SPELLCHECK && defined(__WXGTK3__)
|
||||
extern "C" {
|
||||
#include <gtkspell-3.0/gtkspell/gtkspell.h>
|
||||
}
|
||||
#endif // wxUSE_SPELLCHECK
|
||||
#endif // wxUSE_SPELLCHECK && __WXGTK3__
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// helpers
|
||||
@@ -1023,7 +1023,7 @@ void wxTextCtrl::GTKSetJustification()
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_SPELLCHECK
|
||||
#if wxUSE_SPELLCHECK && defined(__WXGTK3__)
|
||||
|
||||
bool wxTextCtrl::EnableProofCheck(bool enable, const wxTextProofOptions& options)
|
||||
{
|
||||
@@ -1072,7 +1072,7 @@ bool wxTextCtrl::IsProofCheckEnabled() const
|
||||
return (spell != NULL);
|
||||
}
|
||||
|
||||
#endif // wxUSE_SPELLCHECK
|
||||
#endif // wxUSE_SPELLCHECK && __WXGTK3__
|
||||
|
||||
void wxTextCtrl::SetWindowStyleFlag(long style)
|
||||
{
|
||||
|
Reference in New Issue
Block a user