Commit Graph

71268 Commits

Author SHA1 Message Date
Kvaz1r
2a92a0a516 Draw all borders for unfocused text control in wxUniv
The borders didn't appear correctly when the control didn't have focus.

Closes https://github.com/wxWidgets/wxWidgets/pull/2494

Closes #19248.
2021-08-25 16:08:18 +02:00
Vadim Zeitlin
696f1473df Merge branch 'mac-cmp-natural'
Implement wxCmpNatural() for Mac too.

See https://github.com/wxWidgets/wxWidgets/pull/2492
2021-08-25 16:03:23 +02:00
Blake-Madden
78952e8ed5 Improve ListCtrl::EnableAlternateRowColours() documentation
Mention that it needs to be called again after calling
SetBackgroundColour().

Closes https://github.com/wxWidgets/wxWidgets/pull/2493
2021-08-25 16:02:29 +02:00
Vadim Zeitlin
96ab1f0824 Implement wxCmpNatural() using the native function under macOS
Use [NSStting localizedStandardCompare:] which is supposed to use the
same order as Finder does.
2021-08-25 01:00:24 +02:00
Vadim Zeitlin
9c0b543c04 Rename wxCmpNaturalGeneric() test to its actual name
The name of the test was still using the original function name, update
it to the actually used name.

No real changes.
2021-08-25 00:47:26 +02:00
Vadim Zeitlin
dd0427514a Move wxCmpNatural() MSW definition to MSW-specific code
It is tidier to have MSW-specific stuff, such as shlwapi.h inclusion, in
wxMSW rather than common code.

No real changes.
2021-08-25 00:30:22 +02:00
Vadim Zeitlin
8b06dd03aa Use "vc143" version-dependent compiler prefix for MSVS 2022
MSVS 2022 preview defines _MSC_VER as 1930.
2021-08-24 23:05:25 +02:00
Vadim Zeitlin
d6d08087c0 Stop showing locale in the beginning of the unit test
This is useless, it is always just "C" as we haven't changed it yet.
2021-08-24 23:05:25 +02:00
Vadim Zeitlin
8156c921d3 Show precise compiler version when running the unit tests
Although the compiler is already shown as part of the build signature,
it doesn't always show the exact compiler version used, which can be
useful as well, so add it here.
2021-08-24 23:05:25 +02:00
Vadim Zeitlin
8e40441084 Disable wxEVT_TEXT_URL unit test in GitHub CI environment too
It was already disabled under AppVeyor and it also fails when using
GitHub Actions.

This almost certainly indicates that there is a bug in our code, but as
the failure still can't be reproduced locally, it's difficult to debug
and fix, so for now just also disable the test when using GitHub CI.
2021-08-24 22:50:19 +02:00
Vadim Zeitlin
23929ff27f Make preprocessor check in wxTextCtrl test more clear
The condition guarding wxEVT_TEXT_URL test was changed to use
wxHAS_2CHAR_NEWLINES in 15c5125572 (Refactoring, 2021-08-07) but
shouldn't have been as this has nothing to do with the use of "\r\n"
under MSW.

No real changes.
2021-08-24 22:50:00 +02:00
Vadim Zeitlin
8f9e679393 Recognize MSVS 2022 in solution files
Use its native toolset (v143) by default.
2021-08-24 22:11:29 +02:00
Vadim Zeitlin
6e2d6e9bd4 Enable using MSVS prerelease versions in MSVS CI workflow
Without this options (available in 1.0.3 only), MSVS 2022 is not
detected.
2021-08-24 22:07:36 +02:00
Vadim Zeitlin
b48a266c6d Try building with MSVS 2022 too 2021-08-24 22:00:15 +02:00
Vadim Zeitlin
5385c9ced1 Add DLL Release wxMSW CI build
Append the path to the directory containing the DLLs to PATH to allow
the tests to find them.

Also quote the value of the "Configuration" property as it may (and
does) contain spaces.
2021-08-24 19:33:45 +02:00
Vadim Zeitlin
4d465837e0 Disable currently failing DLL Release MSVS CI build
This was merged accidentally, leave only the passing static build until
the DLL build is fixed.
2021-08-24 17:26:22 +02:00
Vadim Zeitlin
6917f54c4b Merge branch 'ci-msw'
Add CI workflow using MSVS to build wxMSW natively.

See https://github.com/wxWidgets/wxWidgets/pull/2488
2021-08-24 17:12:06 +02:00
Vadim Zeitlin
0701402737 Add CI workflow for building wxMSW using MSVS natively
This should allow running all the tests faster than it's done by
AppVeyor.

Ignore changes to this workflow file in all the other workflows.
2021-08-24 17:12:06 +02:00
Vadim Zeitlin
c868088a49 Add MSVS 2019 solutions for the minimal sample and the tests
It seems inconsistent to have MSVS 2019 solution for the main library
itself, but only MSVS 2017 (and earlier) one(s) for the sample and the
tests, so add MSVS 2019 solution to them too.
2021-08-24 17:12:06 +02:00
Vadim Zeitlin
fcc5f5e290 Merge branch 'configure-direct2d'
Enable using Direct2D when building wxMSW using configure.

See https://github.com/wxWidgets/wxWidgets/pull/2487
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
7f8bd498ce Allow resetting IE emulation level to fail in the tests
Warn about it, but don't fail the test if it fails, as it does this in
the GitHub Actions "windows-2019" environment without any apparent ill
effects.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
69f0ccf029 Merge branch 'find-dialog-parent'
Use correct parent for the generic "Find" dialog, even when it is not
shown yet.

See https://github.com/wxWidgets/wxWidgets/pull/2486
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
37c5f079f1 Disable Direct2D checks failing under Wine
Now that these Direct2D tests are compiled, disable those of them that
fail under Wine due to missing support for Direct2D functionality we use
in Wine implementation.

Don't even give a warning message because there would be too many of
them in these tests, just skip them silently.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
6a99b2d9a8 Fix wrong exclusion in MSW cross-build CI workflow
Ignore GTK files, not MSW ones.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
ce92055f3a Fix the effective parent of wxGenericFindReplaceDialog
This dialog is non-modal and so using GetParentForModalDialog() for it
is not quite right, because this function checks that the candidate
parent window is visible, which may not be the case for a modeless
dialog parent, as the dialog isn't necessarily going to be shown
immediately, but may well be shown later, after showing its parent.

And not allowing to use the not yet shown parent was also inconsistent
with the native MSW version which didn't have any problem with this.

So fix this by adding new GetParentForModelessDialog() function and
using it for this modeless dialog instead. This required slightly
refactoring wxDialog code to allow reusing most of it between the old
GetParentForModalDialog() and the new function.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
b6e29ea4d1 Detect Direct2D when building wxMSW with configure
Check for Direct2D headers (only, as DLLs are loaded during run-time
anyhow) and enable Direct2D-based wxGraphicsContext implementation if
they are available when building wxMSW with configure.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
8bbcf0af09 Check that wxFindReplaceDialog parent is non-null before using it
Although this dialog is normally supposed to have a valid parent, don't
crash if it doesn't have one when any of its buttons are pressed.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
0798906e7b Simplify wxFindReplaceDialogBase::Send() code slightly
Use ProcessWindowEvent() instead of GetEventHandler()->ProcessEvent().

No real changes.
2021-08-24 17:12:04 +02:00
Jouk
cc3afe0dc6 Include wx/toplevel.h to for wxTopLevelWindow 2021-08-24 14:05:00 +02:00
Vadim Zeitlin
45dcb1a8a5 Replace IsProofCheckEnabled() with GetProofCheckOptions()
This is more consistent with EnableProofCheck() and allows to retrieve
the current state of grammar checking under macOS, which can be checked
by user and so can be useful to know.
2021-08-23 14:19:11 +02:00
Vadim Zeitlin
94173e3fae Remove stub spell checking functions from wxiOS wxTextCtrl
There doesn't seem to be any need to have these functions here as the
base class implementation already does exactly the same thing (i.e.
nothing at all).
2021-08-23 14:18:42 +02:00
Vadim Zeitlin
db30397921 Implement support for grammar checking in wxOSX
Use native support for grammar checking in NSTextView.

As we're not passing wxTextProofOptions to the lower level function,
this functionality now depends on wxUSE_SPELLCHECK, meaning that even
the previously existing MacCheckSpelling() function is not defined any
more when wxUSE_SPELLCHECK is set to 0. This is not completely
backwards-compatible, but hopefully shouldn't be a problem in practice
and shouldn't break any existing applications which can't disable the
just added wxUSE_SPELLCHECK.
2021-08-23 14:18:42 +02:00
Vadim Zeitlin
79fe43c22d Don't show message box in text sample unnecessarily
This is going to be just annoying on the platforms where spell checking
is not supported, so show the message inside the text control itself
rather than popping up a message box.

Also put a misspelled word in the control from the very beginning to
show that it is highlighted.
2021-08-23 14:18:38 +02:00
Vadim Zeitlin
2bb3083a93 Use wxTextProofOptions itself to enable or disable the checks
Remove a separate "bool enable" argument of EnableProofCheck() and use
wxTextProofOptions::IsSpellCheckingEnabled() to decide whether the
checks should be enabled or disabled.

Also remove wxTextProofOptions ctor and provide named static factory
functions for creating the objects of this class with clearly defined
meaning.
2021-08-23 14:18:19 +02:00
Vadim Zeitlin
72ef834c70 Don't use DLL export declaration with wxTextProofOptions
This class doesn't have any non-inline methods, so applying DLL export
declaration to it is at best useless and might even be harmful, so don't
do it.
2021-08-23 14:17:25 +02:00
Vadim Zeitlin
90e79d8ed4 Implement minimal support for spell checking in wxOSX too
Reuse the existing CheckSpelling() function.

Also deprecate wxTextCtrl::MacCheckSpelling() in favour of the new
portable EnableProofCheck().
2021-08-23 14:17:16 +02:00
Vadim Zeitlin
af43b7c965 Correct description of EnableProofCheck() requirements
This functionality is available since Windows 8 only, not 7.
2021-08-23 14:16:54 +02:00
Vadim Zeitlin
25f9127499 Mark wxTextProofOptions as being new in 3.1.6 in the docs too 2021-08-23 14:16:54 +02:00
Vadim Zeitlin
05df6e0390 Slightly reformat EnableProofCheck() declarations
Keep the entire wxTextProofOptions argument on the same line.

Remove unnecessary WXUNUSED() in the declarations of the function in
wxMSW/wxGTK headers.

No real changes.
2021-08-23 14:16:54 +02:00
Vadim Zeitlin
01d3a96043 Reduce configure warnings about missing spell checking support
It's not really useful to warn that spell checking is not available for
the ports for which it's not implemented anyhow, as there is nothing
that the person running configure can do about it anyhow.

Still warn about missing gtkspell library when using GTK 3, however, as
it may be useful to know that it's not available and could be installed
in order to activate spell checking support.
2021-08-23 14:16:54 +02:00
Vadim Zeitlin
d9ea30cf84 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).
2021-08-23 14:16:16 +02:00
Vadim Zeitlin
fd9e420b42 Verify that wxUSE_SPELLCHECK is always defined
Add sanity check for this symbol, as it's done for all the other
wxUSE_XXXs.
2021-08-23 14:15:38 +02:00
iwbnwif
472aec2d7e Add support for using native spell checking in wxTextCtrl
Add wxTextCtrl::EnableSpellCheck() and implement it for wxMSW and
wxGTK3.

Closes #17544.
2021-08-23 14:15:38 +02:00
Vadim Zeitlin
d6ba8eafc5 Merge branch 'generic-listctrl-fixes'
Fix selection when right clicking in generic wxListCtrl and other minor
improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2483
2021-08-23 02:01:17 +02:00
Vadim Zeitlin
efb5ae2a1d Merge branch 'modernize-dir-test'
Get rid of CppUnit boilerplate in wxDir unit tests.

See https://github.com/wxWidgets/wxWidgets/pull/2482
2021-08-23 02:00:46 +02:00
AliKet
cb6d67bab4 Reset selection on right click in a more efficient way
Instead of using HighlightAll(), use the second argument of
HighlightOnly() to remove selection from the previous current item.
2021-08-23 01:59:07 +02:00
Dimitri Schoolwerth
b4aaaeae1e Remove some stray settings from minimal sample's Xcode projects
Delete a few settings that are either undesired or already set through
Xcode configuration files.
2021-08-23 00:51:19 +02:00
Dimitri Schoolwerth
32bc67fb8c Regenerate Xcode projects
Ran build/osx/makeprojects.applescript several times, comparing usable
output results and verifying final versions. No symbols are removed,
and mostly wxWeb* related ones added.
2021-08-23 00:51:19 +02:00
Dimitri Schoolwerth
0b9176874e Fix wxOSX build with Xcode 10 and later
Update target architectures to support building with the whole range of
supported Xcode versions by not targeting i386 by default, as well as
adding an arm64 target. Targeting i386 results in a deprecation
error starting with Xcode 10:

error: The i386 architecture is deprecated. You should update your ARCHS
build setting to remove the i386 architecture.
2021-08-23 00:51:19 +02:00
Dimitri Schoolwerth
e29e48a77b Fix Xcode builds with wxUSE_REGEX==1
Update the system header include paths as opposed to user header include
paths to be able to also find wx' pcre2.h #include using angle brackets.
2021-08-23 00:51:19 +02:00