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.
Replace it with a private DoRefreshLabels() and call it ourselves from
SetMenuPathStyle() to make the class simpler (and less error-prone, as
it's now impossible to forget to call RefreshLabels() any more) to use.
It seems useful to have the word "Path" in the name of this enum to
indicate that it applies to the paths shown in the menu labels.
Also rename the methods using this enum.
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.
This is related to 7555d1b245 (Fix expansion of the last column in macOS
wxDataViewCtrl, 2021-01-26) which somehow didn't apply the patch fully,
so finish applying it now.
Closes#14939.
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.