Emulate a 1-pixel pen width as closely as possible.
This reverts:
334cf1cc91 (Take HiDPI scale into account for wxGCDC 0-width pen, 2021-04-03)
0d80050057 (Make wxGCDC behavior with 0-width wxPen consistent with MSW wxDC, 2021-03-02)
See #19077, #19115
Python package hosting seems to randomly decide which version of the
package to return to pip running under Trusty: in addition to werkzeug
(see last commit), the version of flask has spontaneously changed from
1.0 to 1.2 in the latest build too.
Just hardcode the versions of all dependencies in the last successful
build and hope they keep working for longer than a day.
Crazily, pip installs seem to be non-deterministic as installing httpbin
in https://travis-ci.org/github/wxWidgets/wxWidgets/jobs/765946720
pulled in werkzeug 0.16.1 which works with Python 3.4, but doing it
again tries to use werkzeug 1.x which isn't.
Fix the version explicitly to work around this.
Trying to use Python 2 under Trusty is hopeless, as pythonhosted.org has
already started dropping support for non-SNI clients and will drop it
completely soon, see https://status.python.org/incidents/hzmjhqsdjqgb
and https://github.com/pypa/pypi-support/issues/978, and SNI is not
available in the system Python 2 version (2.7.6, which is less than
2.7.9 in which it was added).
Note that we still can't use Python 3 everywhere as long as we have
macOS 11 builds as it's not available there.
Since ImageList_Remove() accepts -1 index as a magic number to remove all
images, we need to explicitly prevent using indices < 0 in the call.
Because wxImageList::RemoveAll() uses the trick with -1 index
to call wxImageList::Remove(-1) we also need to refactor this mehod and
call ImageList_Remove() API directly instead.
These tests fail in S/390 Travis CI build, so just don't run them at all
there, as we already did for a couple of tests using /proc that also
failed in other LXC-based builds.
Global "sCR" and "sLF" string objects could have been not yet
initialized when wxMacConvertNewlines{13To10,10To13}() were called as
these functions can be (implicitly) used when initializing other static
objects.
Fix the problem by avoiding the use of these objects, as well of
wxString::Replace(), entirely and just iterating over the string
directly using a simple, and more efficient, for loop.
Note the use of "auto&&": a more usual "auto&" can't be used with
temporary wxUniCharRef created by dereferencing wxString iterators.
Using just "auto" would have actually worked too, but modifying a value
via a copy would seem surprising, so use "auto&&" as a hopefully
slightly more clear alternative.
Closes#19110.
Fix the state of the check/radio items in the menu by updating the
template used by macOS to create the actual menu after showing it and
possibly changing the items state.
This is not ideal because changing the state from the program, e.g.
using wxMenuItem::Check(), still doesn't work correctly, i.e. isn't
reflected in the menu when it's shown, but better than nothing until a
better solution (which ideally would update the menu just before showing
it, but it's not clear how exactly can we do it, knowing that we don't
get wxEVT_MENU_OPEN for this menu neither) can be found.
Amazingly, updating a package has no problems with installing a newer
version incompatible with the current Python version, such as installing
pip 21 when using Python 3.5.
Somehow installing decorator==4.4.2 worked a few times, but then stopped
and now fails with
Could not find a version that satisfies the requirement
decorator==4.4.2 (from versions: )
No matching distribution found for decorator==4.4.2
Try using explicit URL.