Commit Graph

69872 Commits

Author SHA1 Message Date
Vadim Zeitlin
eae08b14c6 Amend the update schedule frequency from the last commit
Even if wxstd.pot is updated infrequently now, we shouldn't document
this as something normal or desirable.
2021-01-21 15:50:02 +01:00
Lauri Nurmi
f7514362ba More accurately describe wxstd.pot update schedule
Git log shows that wxstd.pot was not updated at all in e.g. 2020,
2019, 2018, 2016.
2021-01-21 13:45:00 +02:00
Lauri Nurmi
b78c61af84 Translation docs update: don't recommend 20-year-old gettext; use msginit
Warning about gettext versions earlier than 0.10.35 is pointless,
as even 0.10.35 is from 2001, and so old it isn't even available
on GNU mirrors anymore. We shall not recommend a specific version in
the first place.

The proper way to start a new translation is to use msginit to initialize
a .po file -- just copying the .pot leaves many fields to their default
values, which the translator would need to fill in manually (the
Plural-Forms: field in particular).
2021-01-21 13:42:22 +02:00
Lauri Nurmi
bbd7cb2d3a Fix translation docs: -c is the important gettext switch, not -v
-c does the crucial syntax/format checking, -v is just verbose.
2021-01-21 13:42:22 +02:00
Vadim Zeitlin
3c7326205f Merge branch 'grid-fix-drawing-invalid-cells' of https://github.com/discnl/wxWidgets
Fix drawing of grid cells appearing inside a multicell.

See https://github.com/wxWidgets/wxWidgets/pull/2176
2021-01-21 00:50:09 +01:00
Vadim Zeitlin
7911fdc253 Merge branch 'webrequest_additions' of git://github.com/TcT2k/wxWidgets
wxWebRequest improvements: add DisablePeerVerify(), improve
documentation.

See https://github.com/wxWidgets/wxWidgets/pull/2175
2021-01-21 00:44:37 +01:00
Vadim Zeitlin
e7ff76d762 Merge branch 'cmake-test' of git://github.com/MaartenBent/wxWidgets
CMake: use a common function for adding samples, tests and demos.

Also add wxUSE_WEBVIEW_EDGE support.

See https://github.com/wxWidgets/wxWidgets/pull/2167
2021-01-21 00:42:09 +01:00
Artur Wieczorek
4590f28f7e Fix converting wxBitmap with alpha and mask to wxImage (wxOSX)
When pixel is not masked it should be stored in the target wxImage
in non-premultiplied format.
2021-01-20 19:37:12 +01:00
Artur Wieczorek
efb96a352d Add more tests of converting wxBitmap to wxImage 2021-01-20 19:29:32 +01:00
Paul Cornett
892795ac9c Apply a better fix for HitTest failures in the tests with GTK3
The actual cause of the problem was the tests making the single-line
text control height far too large. So just use the default height for
single-line controls.
2021-01-19 22:50:41 -08:00
Paul Cornett
c530b89ffa Apply anti-alias mode to fonts with Cairo, see #19049 2021-01-19 20:16:16 -08:00
Maarten Bent
c8a71bc631 CMake: Enable wxUSE_WEBVIEW_EDGE when WebView2 SDK is detected
Only for MSVC >1800 (Visual Studio 2017, vc140) and later.
2021-01-19 22:43:09 +01:00
Maarten Bent
71c4653b94 Enable wxUSE_WEBVIEW_EDGE in an AppVeyor test 2021-01-19 22:43:08 +01:00
Dimitri Schoolwerth
1f5b77bad3 Make use of grid helper function GetCellSpan()
Also gets rid of an additional attribute lookup that was recently
added in 00c497125e containing a minimal fix.
2021-01-19 22:30:33 +01:00
Dimitri Schoolwerth
860d9d09bc Refactor code deciding the kind of span of a grid cell
Move wxGrid's GetCellSize() cell span logic into GetCellSpan() for
future usage.
2021-01-19 22:26:03 +01:00
Dimitri Schoolwerth
00c497125e Fix drawing of grid cells appearing inside a multicell
Grid cells are considered for redrawing solely based on having
a (text) value. This can lead to infinite recursion with overflowing
inside cells if wxGridCellStringRenderer::Draw() wants to draw cells
appearing after this one but instead visits the same cell again (because
of a negative cell size as opposed to expected default cell size of 1x1
or a larger spanning size) and calls DrawCell() again for this cell
which will call the renderer's Draw() again etc...

Fix by not taking inside cells into consideration for redrawing. This
is the right thing to do as earlier on in the same function a cell is
not drawn for the same reason. Also the aforementioned Draw() mentions
it shouldn't be called for cell sizes <= 0.

Also fixes the crashing grid test just introduced in 6d3dbc3fe5.
2021-01-19 22:17:41 +01:00
Dimitri Schoolwerth
6d3dbc3fe5 Add test demonstrating drawing of an invalid grid cell
The way the test grid is set up forces drawing of an inside cell (part
of a multicell) which shouldn't normally occur. In this case it
leads to an infinite recursion while drawing the inside cell. Drawing
of inside cells will be fixed by the next commit.
2021-01-19 22:01:23 +01:00
Tobias Taschner
4727693584
Silence harmless warning with wxWebWebRequest CURL 2021-01-19 21:08:01 +01:00
Tobias Taschner
457b213315
Apply suggestions from code review
Co-authored-by: VZ <vz-github@zeitlins.org>
2021-01-19 21:06:31 +01:00
Maarten Bent
564f9d6037 Specify tests to exclude in CI CMake builds
Escape the | in AppVeyor bat file to prevent errors.
2021-01-19 19:58:46 +01:00
Maarten Bent
b51d146adf Run ctest in correct directory on Travis CI 2021-01-19 19:58:46 +01:00
Maarten Bent
6dfb96c075 CMake: Use build directory as ctest working directory
Use existing variable for VS working directory.
2021-01-19 19:58:46 +01:00
Maarten Bent
226a3de596 CMake: Use common function for adding samples, tests and demos 2021-01-19 19:58:46 +01:00
Tobias Taschner
d66b70f224
Add a description of Apple Transport Security to wxWebRequest doc 2021-01-19 15:20:09 +01:00
Tobias Taschner
036b7f29a7
Add wxWebRequest::DisablePeerVerify()
This method allows insecure HTTPS connections when required
2021-01-19 13:16:25 +01:00
Tobias Taschner
bf1b0716e0
Add a note to use wxWebRequest in wxHTTP docs 2021-01-19 13:00:20 +01:00
Tobias Taschner
e8dd552696
Add webrequest sample to documentation
Co-authored-by: PB <PBforDev@gmail.com>
2021-01-19 13:00:19 +01:00
Paul Cornett
4a3ff8c180 Fix bitmap tests with GTK2
wxGTK2 does not support drawing bitmaps with both alpha
and a mask, so it doesn't bother to implement having both.
So skip the test for that case.
2021-01-19 01:35:28 -08:00
Paul Cornett
cea8e60dea Don't set focus from wxTimePickerCtrl::SetValue() on GTK
Match the wxMSW behavior. See #19047
2021-01-18 22:24:39 -08:00
Artur Wieczorek
72ac21cf18 Fix wxBitmap tests under wxOSX
Under wxOSX wxBitmaps have always 32-bit depth.
2021-01-18 23:01:20 +01:00
Artur Wieczorek
79be42122f Don't convert mask to alpha values while converting wxImage to wxBitmap (wxOSX)
wxImage with mask should be converted to wxBitmap with mask and not to
wxBitmap with alpha channel values. Converting wxImage mask to wxBitmap
alpha is not implemented under wxMSW and wxGTK and wxOSX implementation
should adhere to this convention.
2021-01-18 22:29:40 +01:00
Artur Wieczorek
6b572bf694 Add tests of converting wxImage to wxBitmap 2021-01-18 22:14:43 +01:00
Daniel Kulp
3c28244806 Improve wxGrid appearance in dark mode under macOS
Use more appropriate colours for the row/column cell headers and don't
hardcode black (i.e. at least use white instead in dark mode) for the
frozen border.

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

See #18941.
2021-01-18 00:03:10 +01:00
Stefan Csomor
f8af2601c2 Add wxOSX_VERIFY_NOERR macro and use it in wxOSX code
This macro replaces the deprecated __Verify_noErr defined in the SDK.

It is different from assert, as the expression given to the macro is
always evaluated and then, if the result is not zero, and asserts are
on, an assert containing a human readable message with the description
of the error code is triggered.

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

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
2021-01-17 23:57:38 +01:00
Vadim Zeitlin
51cc083f31 Cast error code only once in wxSysErrorMsgStr()
No real changes, just simplify code a little bit by replacing multiple
casts with a single one -- and explaining why is it necessary.
2021-01-17 23:37:38 +01:00
Vadim Zeitlin
febd185fc6 Merge branch 'web-request'
Add wxWebViewRequest and related classes allowing to use HTTPS and
HTTP/2.

See https://github.com/wxWidgets/wxWidgets/pull/977
2021-01-17 18:19:47 +01:00
Vadim Zeitlin
10c85670dc Merge branch 'choice-getstring'
Make wxChoice::GetString() consistently assert in all ports when given
invalid index.

See https://github.com/wxWidgets/wxWidgets/pull/2169

Closes #18852.
2021-01-17 18:18:44 +01:00
Vadim Zeitlin
cc28cd6816 Fix logging when timestamps are disabled after recent changes
The changes of 1065e61ab7 (Merge branch 'log-ms', 2021-01-16) broke
logging when timestamps were disabled as they still tried to format the
timestamp in this case, using empty timestamp, which resulted in an
assert.

Fix this and also make new code more similar to the existing one by
adding wxLog::TimeStampMS() helper parallel to the already existing
TimeStamp() and write it in the same way -- which notably ensures that
it does nothing when the timestamp is empty.

See #13059.
2021-01-17 17:44:51 +01:00
Vadim Zeitlin
4eb345f8fe Fix typo in configure --enable-metafile option help string
Remove the extra "s".

Closes #19045.
2021-01-17 17:33:38 +01:00
Vadim Zeitlin
4a7b6d7e8f Document that index must be valid in wxChoice::GetString()
This is now the case in all ports, and not just in wxOSX, so document
this behaviour and also document that it has changed compared to 3.0.
2021-01-17 00:41:26 +01:00
Vadim Zeitlin
1ddf2ee303 Check that calling GetString() with invalid index asserts
This is the behaviour that would be normally expected and now really
happens for all the controls, including wxChoice.
2021-01-17 00:41:15 +01:00
Vadim Zeitlin
910dfbc010 Assert in wxGTK wxChoice::GetString() if the index is invalid
Similar to the previous commit for wxMSW.

This commit is best viewed ignoring whitespace-only changes.
2021-01-17 00:41:15 +01:00
Vadim Zeitlin
98aaeadf54 Assert in wxMSW wxChoice::GetString() if the index is invalid
Do it for consistency with SetString() and other controls.
2021-01-17 00:41:15 +01:00
Vadim Zeitlin
970ab0a1ae Make sure wxEVT_WEBREQUEST_DATA is processed in the main thread
This event was processed in a worker thread, which was different from
all the other events and also almost surely not thread-safe, so change
this and queue it for processing in the main thread instead.

Use wxMemoryBuffer instead of non-owning pointer in wxWebRequestEvent
and reset the buffer used internally every time to ensure the data is
still available by the time the event is processed.

Also increase the amount of data downloaded in the "advanced" page of
the sample as it has to be greater than wxWEBREQUEST_BUFFER_SIZE, which
is currently 64KiB, to have a chance of seeing the value actually
change, otherwise all the data arrives in a single event. As it is,
using the maximal size supported by the httpbin service, we only get 2
events.
2021-01-16 23:53:15 +01:00
Vadim Zeitlin
4c19572d9d Use switch over enum-valued variable rather than "if"s
No real changes, just make sure we use an (exhaustive) switch rather
than a less obvious sequence of if statements.
2021-01-16 23:33:18 +01:00
Artur Wieczorek
9fe7e0a78e Get rid of unnecessary static casts 2021-01-16 23:01:50 +01:00
Artur Wieczorek
ef9cd70b21 Avoid converting wxBitmap to wxImage
We can set wxBitmap colour mask directly so there is no need
to do it with converting wxBitmap to wxImage.
2021-01-16 23:01:49 +01:00
Artur Wieczorek
321f38831e Fix sizes of images stored in generic wxImageList
Sizing the images stored in the list should stick to the convention
adopted in the native wxImageList implemented in wxMSW.
Images stored in the list should have the sizes as it is declared for
the list even if provided bitmaps have different sizes.
In case of discrepancies their dimensions should be adjusted accordingly
(cropped or extended).
2021-01-16 23:01:49 +01:00
Artur Wieczorek
bde82aa9fb Fix adding image using bitmap and mask colour to nonmasked wxImageList (wxMSW)
If image using bitmap and mask colour is added to nonmasked wxImageList we
need to convert effective mask to alpha channel values prior to adding the
image to the native list to preserve transparency.
2021-01-16 23:01:48 +01:00
Stefan Csomor
b1cf40868d Fix memory leak in wxOverlay in wxOSX
Define dealloc explicitly to make sure the property is released.
2021-01-16 22:20:10 +01:00