Automatically download the WebView2 SDK from nuget (official repo for the SDK)
when enabling wxUSE_WEBVIEW_EDGE to simplify usage.
Copying to 3rdparty/webview2 is still supported optionally.
Remove platform-specific translations.
This is unnecessarily complicated for the single string that we
currently use this for, so just handle it specially.
Also some other minor translation-related improvements.
See https://github.com/wxWidgets/wxWidgets/pull/2213
Since the parent commit multicells work correctly when deleting (and
inserting) rows (or columns) intersecting with them and the comment
warning about it resulting in a crash is no longer needed.
This reverts commit 4d8e8355b4 (Added a warning about multi-cells in
wxGrid::DeleteRows() docs., 2011-12-25).
See #4238.
This will allow reusing the same strings in other places.
Also use this as opportunity to add "msw" as the (preferred) synonym for
"win" for general consistency.
This can be useful to implement custom handling of WM_COMMAND for the
popup menus, so make this function virtual and document it to indicate
that it is now part of the public API.
Closes https://github.com/wxWidgets/wxWidgets/pull/2170
It was unexpected that using wxSizerFlags().Right().CentreVertical()
didn't right-align the item because CentreVertical() reset the alignment
in the horizontal direction rather than just setting it in the vertical
one, so change this, document the new behaviour explicitly and add a new
unit test checking for it.
Closes#18989.
Under MSW, don't set the state to State_Cancelled as soon as Cancel()
was called, as the request was still used from the other threads
afterwards, resulting in race conditions and crashes.
Fix this by just removing the SetState(State_Cancelled) call from the
main thread, as it was redundant anyhow. This also makes the behaviour
correspond to the documentation, which indicates that Cancel() works
asynchronously.
Also ensure, for all backends, that we actually cancel the request only
once, even if public Cancel() is called multiple times. This required
renaming the existing wxWebRequestImpl::Cancel() to DoCancel().
Although this was supposed to work, specifying "%l" in wxLog time stamp
format actually didn't because wxLog timestamps were stored as seconds.
Fix this by storing them as milliseconds and add a simple test (not
executed by default) showing that "%l" works correctly now.
Still keep the old wxLogRecordInfo::timestamp field for compatibility,
as it was documented.
See #13059.
It's up to the application code to decide how it handles the HTTP status
codes it gets back from server, there is no need to have a special
method for handling them in wxWebRequest itself.
We also shouldn't skip downloading the response body just because it was
unsuccessful, we may still need it (e.g. it's very common to return the
detailed error description in a JSON object in the message body when
returning some 4xx error), so don't do it in wxMSW implementation and
add a test verifying that we still get the expected body even for an
error status.
Also improve wxWebRequest::State values documentation.
Follow the convention of using the event macro names (rather than the
event type) names in @event documentation in wxNotificationMessage
documentation too, e.g. use EVT_NOTIFICATION_MESSAGE_CLICK rather than
wxEVT_NOTIFICATION_MESSAGE_CLICK.
Closes https://github.com/wxWidgets/wxWidgets/pull/2166
This is shorter and doesn't imply that just the name (and not the full
path) is being returned.
Also rename wxWebResponse::GetFileName() to GetDataFile() for the same
reasons and for consistency. And document this previously undocumented
method.
Check that current state is State_Idle in wxWebRequest itself only once
instead of doing it in 2 (out of 3) wxWebRequestImpl implementations.
Also assert if this is not the case instead of silently doing nothing
which would surely be more difficult to debug.
Using shared pointer seems to be ill-advised here, the stream shouldn't
be shared as it's going to be used by wxWebRequest itself and can't be
used by the application code in parallel, so the ownership transfer
semantics is more appropriate.
We could take a wxScopedPtr<> instead, but wx API takes ownership of raw
pointers everywhere else, so do it here too.
Incidentally fix a bug with calling IsOk() on a possibly null pointer.