Commit Graph

71051 Commits

Author SHA1 Message Date
Artur Wieczorek
9b542a965e Simplify drawing spline in wxPostScriptDC
We can produce simpler and more readable PostScript code by doing
the calculations of Bézier curve parameters in the code instead
of delegating this task to the PostScript processor.
2021-07-04 20:12:45 +02:00
Artur Wieczorek
819b11ff89 Iterate over wxPointList with STL syntax in wxDC::DoDrawSpline
STL syntax is more readable than notation with legacy API.
2021-07-04 20:06:44 +02:00
Artur Wieczorek
4423f6d256 Use wxStack instead of simulating a stack with array
We have a dedicated wxStack class so there is no need
to simulate a stack with array.
2021-07-04 19:35:48 +02:00
Artur Wieczorek
cc5bfc0fb1 Implement DrawSpline in wxSVGFileDC
Drawing Bézier curves is supported natively in SVG so these curves
should be used instead of generic wxDC implementation based on
polygonal approximation.
2021-07-04 19:22:02 +02:00
Vadim Zeitlin
02c90d126c Merge branch 'file-tests'
Clean up file tests and re-enable most of them in the CI workflow using
Wine.

See https://github.com/wxWidgets/wxWidgets/pull/2416
2021-07-04 18:23:03 +02:00
Vadim Zeitlin
9eea249924 Set locale to C.UTF-8 when running tests under Wine
Using UTF-8 encoding seems to be required for the Unicode file names to
work with Wine.
2021-07-04 17:44:39 +02:00
Kvaz1r
2f71702e4e Don't refresh unshown menu item 2021-07-04 18:34:39 +03:00
Vadim Zeitlin
425151d6ba Re-enable most of wxFileName tests under Wine
Exclude just the single test which fails when using Wine, but not all
the rest of them.

This is again similar to the grand-parent commit for the file functions
tests.
2021-07-04 15:09:06 +01:00
Vadim Zeitlin
f31a745909 Remove unnecessary c_str() from wx var arg functions arguments
Using c_str() for arguments to wxString::Printf(), Format() and
wxLogXXX() is useless since wx 2.9 days, so simply remove them.

No real changes, this is just a (long due) cleanup.
2021-07-04 15:08:13 +01:00
Vadim Zeitlin
071771474e Remove CppUnit boilerplate from wxFileName test
This is similar to the grand parent commit for the file functions.

No real changes.
2021-07-04 15:03:12 +01:00
Vadim Zeitlin
dde4413f36 Re-enable most of file functions tests under Wine
Exclude just the single test which fails for mysterious reason when
using Wine, but not all the rest of them.
2021-07-04 15:03:12 +01:00
Vadim Zeitlin
bab92b4805 Remove CppUnit boilerplate from the file functions test
This cuts down the number of lines and allows to execute, or exclude,
individual tests easily.
2021-07-04 15:03:08 +01:00
Vadim Zeitlin
3e1687c36b Use WX_ASSERT_FAILS_WITH_ASSERT in file functions test case
Make the code shorter and more clear by using an existing macro checking
that the expected assert happens instead of writing it out.
2021-07-04 13:56:24 +01:00
Vadim Zeitlin
723265f9ef Merge branch 'ci-msw-cross'
Add workflow for cross-building wxMSW on GitHub Actions.
2021-07-03 17:58:41 +02:00
Vadim Zeitlin
7d9d4c9e50 Rename GitHub Unix CI workflow
No real changes, just use a less generic name now that we have wxMSW
cross-building CI workflow too.
2021-07-03 17:57:43 +02:00
Vadim Zeitlin
5cac8a6918 Enforce valid drag column/row index in DoGridDragResize()
Add an assert to this function checking that the index is valid before
using it with wxGridOperations::GetLineStartPos(), and actually avoid
calling the function when this is not the case to avoid assertion
failures when wxEVT_GRID_CELL_LEFT_CLICK is handled in user code.

Also add comments clarifying the preconditions for calling various
drag-related functions.

Closes #19218.
2021-07-03 16:31:15 +01:00
Vadim Zeitlin
e28b2d91fc Revert commits trying to fix wxWebRequest tests under Wine
This reverts commits 7d796c6aa6 (Install python3 and pip for httpbin,
2021-06-27) and 3808e6a28d (Install winbind package required for using
wxWebRequest with Wine, 2021-06-28) as we skip wxWebRequest tests anyhow
under Wine because they don't work with its WinHTTP implementation, so
running httpbin is not necessary any longer and so neither is installing
Python.

These commits are still preserved in history and this commit itself
could be reverted later if Wine WinHTTP becomes functional enough to run
wxWebRequest tests successfully.
2021-07-03 17:21:07 +02:00
Vadim Zeitlin
2ac5510551 Skip running currently failing tests under Wine
Ideally these failures ought to be debugged and fixed, but this is not
really critical as the tests pass under native MSW systems, so it seems
like the failures are due to problems in Wine rather than with the tests
themselves, so for now simply skip the failing tests to let the entire
build pass.
2021-07-03 17:21:07 +02:00
Artur Wieczorek
6bd396b38a Update wxDC::DrawSpline() documentation
Mention that drawn spline is not an interpolating curve.
2021-07-03 17:18:04 +02:00
Vadim Zeitlin
e70be8f82b Fix indentation in wxGrid mouse processing code
Indent "break" statements correctly and remove unnecessary braces.

No real changes.

This commit is best viewed ignoring whitespace-only changes.
2021-07-03 15:52:04 +01:00
Vadim Zeitlin
2be8f78982 Make wxExecute() unit test work when using Wine too
Use wxTEST_RUNNER in this test, which can be/is set to "wine" by the
GitHub wxMSW CI workflow and can also be set manually if necessary, to
make executing MSW commands under non-MSW systems have a chance to
actually work (but note that the tests still fail when run under Wine).
2021-07-03 16:45:15 +02:00
Vadim Zeitlin
1051d9f0da Rename WINERUN environment variable to wxTEST_RUNNER
Make the variable name wx-specific before starting to use it in wx tests
too.
2021-07-03 16:45:15 +02:00
Vadim Zeitlin
3808e6a28d Install winbind package required for using wxWebRequest with Wine
This should address

009a:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is
outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually,
you can find it in the winbind package of your distribution.

Wine error and the subsequent test failures.
2021-07-03 16:45:14 +02:00
Vadim Zeitlin
3c714de200 Launch Xvfb before running non-GUI tests in GitHub wxMSW workflow
We must be able to create windows even in non-GUI tests for the windows
used internally, e.g. the one created during wxSocket initialization, so
ensure Xvfb is running before the tests start.
2021-07-03 16:45:14 +02:00
Vadim Zeitlin
938a0dd919 Slightly improve check for pip in httpbin script
Using "-m pip" results in an unwanted usage message from pip, so use
"-c 'import pip'" instead.
2021-07-03 16:45:14 +02:00
Vadim Zeitlin
0eca5b6846 Use wine64 for running 64 bit MSW binaries
Add WINERUN envirionment variable containing the right command to use.
2021-07-03 16:45:14 +02:00
Vadim Zeitlin
0bb6f80a1e Check that lsb_release is available before using it
It is not present in e.g. sid-slim image used for wxMSW cross-build CI
workflow.
2021-07-03 16:45:14 +02:00
Vadim Zeitlin
b9fb8358b3 Add the directory containing MinGW DLLs to Wine PATH too
These DLLs are required for running any applications built using MinGW.
2021-07-03 16:45:14 +02:00
Vadim Zeitlin
7d796c6aa6 Install python3 and pip for httpbin
We need Python 3 for running httpbin for wxWebRequest tests.
2021-07-03 16:45:14 +02:00
Vadim Zeitlin
3e5cf7a5c7 Fix owner after checkout 2021-07-03 16:45:14 +02:00
Maarten Bent
7828975bb3 CMake: Never use lib prefix for msvc
Fixes regression introduced in f830bde25b (CMake: Improve library names,
2021-05-24)

Closes https://github.com/wxWidgets/wxWidgets/pull/2411
2021-07-03 14:33:07 +01:00
PB
3aed157e19 Update Czech translations
Closes https://github.com/wxWidgets/wxWidgets/pull/2410
2021-07-03 14:31:36 +01:00
CPUBug
67d9eb2541 Fix wxNet build problem when cross-compiling using CMake
Fix the case of "winhttp" library, this is important when using
case-sensitive file systems.

Closes https://github.com/wxWidgets/wxWidgets/pull/2409
2021-07-03 14:24:20 +01:00
Artur Wieczorek
b35d595e5d Check that number of points passed to wxDC::DrawSpline() is at least 2
DoDrawSpline() implementations for all ports work for the number of points
>= 2 (for 2 points there is drawn a straight line) so we need to add checks
whether this requirement is met.

See #19172.
2021-06-30 22:24:28 +02:00
Maarten Bent
46c8b608b6 Fix using LISTVIEW theme 2021-06-28 23:56:27 +02:00
Maarten Bent
d1ab1b218e Restore wxDC attributes after drawing with renderer 2021-06-28 23:56:23 +02:00
Maarten Bent
6831a91b7d Fix building Render sample with precompiled headers 2021-06-28 22:59:11 +02:00
Kvaz1r
ef90e73e5a Properly refresh item after menu dismissing 2021-06-28 10:16:57 +03:00
Artur Wieczorek
a3988c8db6 Implement getting/releasing HDC in Cairo wxGraphicsContext (wxMSW) 2021-06-28 00:19:15 +02:00
Artur Wieczorek
dd7bcbd9eb Implement getting/releasing HDC in Direct2D wxGraphicsContext
See #19207.
2021-06-28 00:18:16 +02:00
Artur Wieczorek
5cb255cc8d Demonstrate drawing on wxGCDC in renderer sample
This is to demonstrate how wxRendererNative works with various
wxGraphicsRenderers.
2021-06-27 23:47:23 +02:00
Artur Wieczorek
0939130158 Refactor wxGCDC to delegate acquiring/releasing HDC to wxGraphicsContext
Instead of implementing MSW-specific code to handle HDC for GDI+ context
directly in wxGCDC delegate acquiring/releasing HDC to underlying
wxGraphicsContext. Decoupling GDI+-specific code from wxGCDC will allow
us to implement handling HDC in other graphics renderers in a clean way.
2021-06-27 23:46:21 +02:00
Kvaz1r
2209ec29f7 Add handling LEFT_UP 2021-06-27 21:50:09 +03:00
Vadim Zeitlin
769cb2e205 Add workflow for cross-building wxMSW on GitHub Actions
Use MinGW to build and Wine to run the GUI tests.
2021-06-27 13:40:10 +02:00
Vadim Zeitlin
996a981170 Merge branch 'github-ci-mac-builds'
Add wxMac and wxiOS builds to GitHub CI workflow.
2021-06-26 17:07:37 +02:00
DINAKAR T.D
2ec60e8103 Update Tamil translations 2021-06-26 17:06:29 +02:00
Vadim Zeitlin
5f3bca00c0 Skip building tests too if skip_testing flag is set
Currently it's only used for wxiOS build and the tests don't build
there.

Also set working-directory for the test building step once instead of
using "make -C" option twice.
2021-06-26 16:18:14 +02:00
Vadim Zeitlin
a5cf7f3479 Fix determining the number of logical CPUs under macOS
Use sysctrl instead of nproc which doesn't exist under Mac.
2021-06-26 16:18:14 +02:00
Vadim Zeitlin
32f2a679b4 Add wxMac and wxiOS builds to GitHub CI workflow
Run the builds under macOS 10.15.
2021-06-26 16:18:14 +02:00
Kvaz1r
05875a76e9 Fix handling mouse capture 2021-06-26 17:11:41 +03:00