10.15 is being phased out by GitHub, so switch to the still supported
runner platform version.
Closes#22698.
(cherry picked from commit 4e26568f9727936d3c84b1f3689086f07ff71878)
Switch to a local fork of the action using node 16 and latest
actions/core package as both are necessary to avoid getting deprecation
warnings.
(cherry picked from commit f044e5cab348d687c81d905949b9c6c9f2ce9422)
Do not hide cells without values at GTK level, as this makes them not
only appear as blank (which is fine), but also prevents them from being
edited, which is not, as the user should be able to enter values into
the previously empty cells.
This fixes regression introduced back in 74e1c444fa (Don't show bogus
value when there are none in wxGTK wxDVC neither, 2021-12-01).
Note that this also undoes the changes of 8aefedcb45 (Remove duplicated
HasValue() call from wxGTK wxDataViewCtrl code, 2022-05-08) and
HasValue() is called twice again now, but this is less of a problem than
wrong behaviour fixed by this commit and we can address it later, e.g.
by passing the cell value to PrepareForItem() instead of retrieving it
inside it, if it turns out to be really worth it.
See #23523.
(cherry picked from commit 821c2a07fe2b29c283e11f25b184e3d6d9a17013)
According to Apple's documentation, the presentsCalendarOverlay property
is supported in macOS 10.15.4 and later.
See #23520.
(cherry picked from commit 9f94f4069c51023ddd215bee5a62046e0183f5df)
Don't hang forever in this case but just return an error immediately.
This notably fixes hanging in wxFTP::GetFilesList() as the socket it
used for retrieving the list of files was always closed by the server
after sending the full list, but we kept trying reading from it.
See #23519, #23521.
(cherry picked from commit c1a27f3beb4b9b37ef237a7db860f9a056442377)
This macro was still used with clang because it also predefines
__GNUC__, contradicting its name and purpose, as it was always identical
to just wxGCC_WARNING_SUPPRESS.
Only make it do something for gcc now and nothing for clang.
(cherry picked from commit 44dfad47e2768447950baa544ee1a464a723cd5f)
Remove the default value for the "toggle" argument of the deprecated
AddTool() overload to ensure that code calling AddTool() with just the
ID, label and bitmap compiles even with WXWIN_COMPATIBILITY_2_8 defined.
This fixes building wrapsizer sample in this build.
Fixing it in UTF-8 build in 52e5561ca5 (Fix wxRegKey compilation in
UTF-8 build, 2023-03-24) broke it in ANSI build, fix it too now by using
wxChar instead of always using wchar_t.
The changes of d979a7f0d8 (Fix memory leak of command line arguments in
wxMSW, 2022-12-26) broke compilation with wxUSE_UNICODE==0 as they were
backported from master where this case isn't possible any more.
Adjust these changes to work in non-Unicode build too.
See #23082, #23516.
This build is the one which risks getting broken the most as it's so
little used, so we must have a test for it in the CI.
Also enable 2.8 compatibility for it under assumption that people
disabling Unicode support must be working with legacy code bases.
There doesn't seem anything we can do about them simply and this code
was already completely changed in the version used in master, so just
suppress them.
See #23505.
Try to make the code generating key events a bit more clear and also
avoid duplicating the checks in AdjustCharEventKeyCodes() by returning
true from this function if the key code passed them.
This shouldn't result in any real changes in behaviour.
See #23452.
(cherry picked from commit 1506d46a1dc4aead2f7bc3b2fda94c3ca648047e)
Don't use isalpha() in it as this was potentially incorrect, both
because the key code could be not in the supported range and because
isalpha() might return unexpected result in non C locale, and also
inconsistent with AdjustCharEventKeyCodes().
Just check that the code is in a..z or A..Z range explicitly instead.
See #23379.
(cherry picked from commit 4799785b6dfc2d4490598b447c99435105b8ebba)
Use the key code corresponding to the key in the US keyboard layout for
the key down/up events even when not actually using US layout, as this
is much more useful than simply returning 0 as was done before.
It also is compatible with the behaviour of the other ports.
See #17643, #23379, #23410.
(cherry picked from commit 2c0f6a2aa0c8d0650d1f856aa279ce7495925c17)
Set DPI to 96 in RenderTargetProperties when creating HwndRenderTarget
to prevent pixel scaling.
If the value is set to zero, Direct2D sets the HwndRenderTarget's DPI to
match the window's DPI.
When the DPI of the ID2D1RenderTarget is not set to 96, Direct2D
performs pixel scaling.
See #23486, #23496.
(cherry picked from commit 3a18b6ba184049485c3cf21f3bbaf4a96d53c600)
This function must be called to be able to re-create the EGL drawing
surface after the window layout have changed, such as after a reparent
of the canvas or of it's grandparents.
Make it suitable for use in this case by re-creating the surface if
there already was one and document this function to make it part of the
public API.
Closes#23366.
(cherry picked from commit 23ccdb23c84b6b3de74d1cd83c83d7ad01431725)
It gives the following error:
The application has failed to start because its side-by-side configuration is incorrect
Fix this by specifying the xml namespace. Examples on the Microsoft website use v2, so change this too.
(cherry picked from commit eaab67dee12c72f80e2a79658be3e98619edac9c)
Document that it returns the same value as GetDPIScaleFactor() wxWindow
method and _not_ the wxWindow method with the same name.
This is very confusing, but there doesn't seem to be anything to be done
about it by now.
See #23441.
Closes#23469.
(cherry picked from commit 5e7b08f9ea996fcb9e718b8dd0a5eb01b6d2e6e3)
There is a lot of overhead in the gtk_combo_box_text_insert_text
function, so adding a lot of items to a choicebox can be an expensive
operation when it is used. Instead directly access the underlying data
model and add the items to it.
Experiments show that for adding 10000 items to a wxChoice, the amount
of time spent in wxChoice::DoInsertItems for each method are:
gtk_combo_box_text_insert_text: 6.75s
gtk_list_store_insert_with_values: 438.2ms
(cherry picked from commit 983608c0f24bae47d7ef164a10e00baba6c66438)
See #23443.
Correct description and writing direction for a few languages.
This is the part of c8d2244c63 (Update language database and fix some
problems in it, 2023-04-07) from master which fixes the existing data,
without adding new languages.
See #23419.
Closes#23430.
Return the default locale name under old Windows versions instead of
always returning an empty vector and logging a spurious error.
See #23416.
(cherry picked from commit a242283456ffd0920a2384f6fee45d56a7ecc3a5)
The list client data must be destroyed not only when closing the
resource browser dialog (see 754f75c1cd (Fix memory leaks in artprov
sample, 2022-01-28) but also whenever the art client is changed.
See #23417, #23418.
(cherry picked from commit 02cba46643a5988db1b0e803e18e2dc1a55d1d21)
Constructing wxString from "char*" format string was wrong as it
interpreted it in the current locale encoding which could be different
from UTF-8.
(cherry picked from commit 5a9e433524020dc6b653183bdd338bb3647902a9)
Do not assume that C locale uses UTF-8, as this is simply not true and
none of the CRT functions handle UTF-8 correctly with this locale.
Do recognize locales explicitly using UTF-8 charset as being in UTF-8.
On most Unix systems (including Linux), it didn't really matter that we
didn't do it, because we used nl_langinfo() there, but it does matter a
lot with MSVC under MSW whose CRT supports UTF-8 now, but UTF-8
functions were not used there -- do use them now.
(cherry picked from commit a1d289fe3ea74aa1c713e0f02f5fd5f83810af58)
An existing unit test failed in UTF-8 build because using "%c" with an
invalid character triggered an assert due to trying to encode in UTF-8
(wchar_t)-1 that vswprintf() put into the returned buffer.
Fix this by not using the buffer contents at all if the function failed.
Note that although this seems to be harmless in wchar_t build, it was
still useless there, so don't make this specific to UTF-8 build.
(cherry picked from commit f9c109957ed286e12bc15e93f9a8da0a7b78f7f1)
This is similar to the fix in the previous commit and is needed for the
same reason.
(cherry picked from commit fab541a8ff8e62914c6dee905558ec3270d51432)
Under MSW, where wchar_t uses UTF-16, using wxString::length() was
wrong, as it could be smaller than the actual length of the wide
character string, e.g. 1 instead of 2 for a string containing a single
surrogate character, such as U+2070D used in wxStringOutputStream::Tell
unit test.
This makes this test pass under MSW too now.
(cherry picked from commit aea45196ab8225e54df1828699b44b31ba48ecb9)
Use a macro to return a valid pointer to a wide string even in UTF-8
build, where we don't have a permanent wchar_t buffer to return a
pointer to.
(cherry picked from commit 52e5561ca539da3ce467996c7bb9b038229acb98)
Fix iterator going past end of string in PosLenToImpl, it can't become
end() as the end iterator can't be dereferenced.
See #23305.
(cherry picked from commit 73ad17db4ec9a48e64ed40f5020918ec9a05a8a5)
This option is useless with it and is, at best, ignored or, at worst,
results in errors if it happens to be used together with -Werror,
-Wunused-command-line-argument
See #23314.
Closes#23317.
The first unit test using wxWebView sometimes fails in other builds too,
so try using the same hack as was previously used for the clang build
for them as well.
(cherry picked from commit 3ac39970b1e9c30c5d339d8a03d19d1d4fba504d)
Since 8.0~repack-3 version of the Debian Wine package, installing wine64
doesn't create wine64 symlink any more and wine package needs to be
installed to do it, apparently due to the changes done to fix
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029536
This resulted in the tests not running any more because we used wine64
for running them. Just use "wine" now and install wine package, as it
should still run 64-bit binaries just fine.
(cherry picked from commit 28e0a7e01debf01e8f42524b6071714b7778c6c6)
Use the LOCATION_DEBUG or LOCATION_RELEASE property of an imported target (like NanoSVG)
to determine the full library path.
See #23373, #23390.
(cherry picked from commit 81029586653c662d7a6bff3cc2e0e45e417cb248)
If the toolbar colour had been changed from default, leave it set
instead of overwriting it with the new COLOR_BTNFACE value on system
colours change.
See #23386.
(cherry picked from commit 8cf1e75750ee01f11ce8b8c2667876a76dfdfcbb)