Commit Graph

73445 Commits

Author SHA1 Message Date
Vadim Zeitlin
7ad5b882b6 Enable wxWebView in ASAN Unix CI build
Work around the problem which was previously hidden by 07dfc18cc0
(Disable wxWebView in ASAN CI build, 2021-01-31) by building the webkit
extension shared library without ASAN.

This should ideally be handled at the build system level, but this seems
difficult to do, so use this hack for now -- it at least ensures that
wxWebView unit tests are tested with ASAN too.

(cherry picked from commit 8ee559430b11008ec3825d8470aa281808091b37)
2023-03-29 12:28:12 +02:00
Paul Cornett
98261d4a44 Fix handling of duplicate -arch or -framework options
See #23356

(cherry picked from commit 30181a9dd92405f09a44a149a2d50280e08cb504)
2023-03-18 17:21:53 +01:00
Vadim Zeitlin
36d359c470 fixup! Improve date validation in wxDatePickerCtrlGeneric 2023-03-13 17:07:38 +01:00
Vadim Zeitlin
4d3b158125 fixup! Improve date validation in wxDatePickerCtrlGeneric 2023-03-13 16:24:55 +01:00
Tobias Taschner
96276645ad CMake: silence shorten-64-to-32 warnings on macOS
See #23331.

Closes #23329.

(cherry picked from commit 41194a7b2a90e81f8626d226da650957b616a6b6)
2023-03-13 16:11:39 +01:00
Maarten Bent
6f0ecd48f0 CMake: Apply no-RTTI compile options directly to targets
Don't set global compile options or defines.

(cherry picked from commit 865f7aced21b03fc522b6b62b6f494221fa36cb8)
2023-03-12 21:10:31 +01:00
Maarten Bent
b5ef8b71d3 CMake: Update documentation of wxWidgets_USE_FILE
This is not defined in CONFIG mode, so check its availability before using.

(cherry picked from commit ea56496e0a2340fb92edfb6c7476c4a355d7edaa)
2023-03-12 21:10:31 +01:00
Maarten Bent
ba6e78ec62 CMake: Enable large file support
Define HAVE_LARGEFILE_SUPPORT and add '_FILE_OFFSET_BITS=64' compile definition.
Make it a PUBLIC definition so it is part of the interface, and defined when importing a target.

Check if fseeko is available, which is used in the large file code.
Also add the compile definition to wxconfig's cppflags, because configure does this too.

Large file support can be disabled with the wxBUILD_LARGEFILE_SUPPORT option, similar to configure's --disable-largefile.

Fixes #22750

(cherry picked from commit 1051dfd1410673a25a767fb3b448c858f493108a)
2023-03-12 21:10:28 +01:00
Vadim Zeitlin
fe3dff8aa6 Add forgotten wxUSE_VALIDATORS checks
Compilation with wxUSE_VALIDATORS==0 would have failed after the recent
changes, so fix this by adding the missing check.

See #23312.

(cherry picked from commit 623591823d503a46a843503c126d2bfc542fef3f)
2023-03-09 00:22:09 +01:00
Miguel Gimenez
c08e48d627 Use wxCOL_WIDTH_DEFAULT instead of -1 in wxDataViewCtrl functions
Replace -1 with wxCOL_WIDTH_DEFAULT in the header and the documentation
for clarity.

See #23307, #23325.

(cherry picked from commit cf3dcb230a009c6748dc9eb986df805edfac84b4)
2023-03-09 00:21:57 +01:00
Vadim Zeitlin
70b31c6b52 Improve date validation in wxDatePickerCtrlGeneric
And a couple of minor fixes in the related code.

See #23310.

(cherry picked from commit 8f22eb515776333e48a15f35ec7f37867f9d58bc)
2023-03-09 00:17:39 +01:00
Vadim Zeitlin
72e38253cb Merge branch '3.2-ci-containers' into 3.2
Run Ubuntu 18.04 builds in a container on GitHub CI.

See #23320.
2023-03-06 23:58:34 +01:00
Vadim Zeitlin
24d696cfec Switch CMake wxGTK build to Ubuntu 22.04
Avoid warnings about using deprecated Ubuntu 18.04 runner.

(cherry picked from commit f8da25ca4533704d83a55705eb2559fefd23c2b3)
2023-03-06 23:13:25 +01:00
Vadim Zeitlin
1074cc885e Run Ubuntu 18.04 builds in a container on GitHub CI
Ubuntu 18.04 runner environment is being deprecated, so use a container
running inside the latest Ubuntu runner environment instead.

This is a combined cherry-pick of several commits merged into master as
part of e6dfd9748f (Merge branch 'ci-use-containers', 2022-10-10)
excluding those removing pre-C++11 support, which is still needed in
this branch.
2023-03-06 23:09:49 +01:00
Blake-Madden
cb4ebdc66d Document wxSplitterWindow::SetSashPosition() argument better
Explain the special meaning of 0 and negative values in this function.

See #23299.

(cherry picked from commit 809d2918ccd01ac029ff3d0bc3a143c140832862)
2023-02-28 18:31:52 +01:00
Vadim Zeitlin
db1beaf436 Fix clang warnings about truncating 64 bit ints to 32 bits
See #23301.

(cherry picked from commit 2c530fa513da257b3892df1816ccbf00e8fa8ba5)
2023-02-27 16:17:38 +01:00
Stefan Csomor
f13f561296 Fix initial width of wxTextCtrl in wxOSX
In the process of fixing #22374 by using native best sizes, empty fields
were getting a small, but positive best width, this broke the trigger
for using default widths for empty fields, so fix this by checking that
the width is big enough and not just zero in DoGetSizeFromTextSize().

See #23295, #23250.

(cherry picked from commit fa23d607e9332e884d4ba835cf97c8b954f59cc0)
2023-02-27 16:15:54 +01:00
Stefan Csomor
0687e2dcc4 Fix background of shaped frames under macOS
Don't set it to avoid overriding the "clear background" used for shaped
windows.

Closes #23286.

See #23296.

(cherry picked from commit e49b791ca9a093927e0b06bf3794e32fef0cb644)
2023-02-27 16:14:46 +01:00
NorwayFun
ff680eb3fa Update Georgian translations
See #22673.

Closes #23292.

(cherry picked from commit 3235482c918fa1bcf50b2743d7f26f653b61804e)
2023-02-27 16:14:06 +01:00
Vadim Zeitlin
026b2c5dc9 Remove wxSYS_COLOUR_MAX from documentation
There is no real need to document this, it's not a valid enum value and
having it in this file without a trailing comma was a syntax error.

Closes #23298.

(cherry picked from commit 5b6b644e8bcb5b9503ff1a5fb49b2db768cb625c)
2023-02-25 22:04:53 +01:00
Vadim Zeitlin
35adde26b5 Fix losing underline/strike-through in wxFont in wxOSX sometimes
The call to wxNativeFontInfo::InitFromFont(), added to
wxFontRefData::Alloc() in 74c0fe6dcc (Serialize font style correctly in
Mac wxNativeFontInfo, 2022-04-28), lost the existing values of the
underline and strike-through attributes that are not represented by
CTFont and so resulted in some underlined fonts being actually rendered
without underline.

Fix this by explicitly preserving and restoring these attributes before
and after calling InitFromFont().

Also remove the unneeded assignment to m_info, as InitFromFont() already
fully reinitializes it anyhow.

See #23264.

(cherry picked from commit 8b5f0493151f1b74180021256e3ee4b6b2617e9e)
2023-02-22 17:29:42 +01:00
Ulrich Telle
acd030c707 Fix setting locale to wxLANGUAGE_UKRAINIAN
Use GetCanonicalWithRegion() (instead of LocaleTag)  in the Windows
implementation of method wxLanguageInfo::TrySetLocale() -- as is done in
the non-Windows implementation of this method -- and to ensure that we
use the correct "uk-UA" for Ukrainian instead of the wrong (because
conflicting with the UK English) "uk".

See #23269.

Closes #23210.

(cherry picked from commit a0be352a3f95253dde0de952fb41f7157ebd1840)
2023-02-20 18:37:59 +01:00
Artur Wieczorek
fda2ff6b6a Fix updating value of item in wxPGArrayEditorDialog
Index of edited item can be retrieved from wxListEvent (is set by
associated wxListCtrl in wxEVT_LIST_END_LABEL_EDIT) and there is no reason
to determine it in a alternative way (what can be problematic).

See #23272.

(cherry picked from commit 5704b87152c10c685569b646bc59b55acccc06d4)
2023-02-19 23:04:22 +01:00
Vadim Zeitlin
44870f2c9f Minor fixes to wxWebRequestCURL
Fix building with wxUSE_SOCKETS==0 and avoid deprecation warnings when
using newer libcurl.

See #23257.

(cherry picked from commit f45024134384ecf36647ddc1a6b7b8a9a26de063)
2023-02-14 00:49:12 +01:00
Vadim Zeitlin
4b57475e58 Fix wxFLEX_GROWMODE_ALL in wxFlexGridSizer with proportions
Setting wxFLEX_GROWMODE_ALL for the non-flexible direction broke
handling of proportions in the flexible direction which were
unexpectedly not taken into account at all any more due to not passing
them to DoAdjustForGrowables().

Fix this by still respecting the proportions in this case and add a test
case to ensure this doesn't get broken again.

See #23251, #23253.

(cherry picked from commit 6bfabd7afe16ed734565635228d540cb47b16970)
2023-02-14 00:47:40 +01:00
Vadim Zeitlin
17d7cf3a5a Add wxSUBRELEASE_NUMBER to wxGetLibraryVersionInfo() if non-zero
Keep using just the first three components of the version if
wxSUBRELEASE_NUMBER is 0, but do add it to the version if it isn't, to
allow distinguishing x.y.z releases from x.y.z.w hot-fixes.

(cherry picked from commit cb41471093a4b43f69aaa59557ffef7e81689849)
2023-02-14 00:46:30 +01:00
Stefan Csomor
393b57511c Respect composition mode in wxOSX wxGraphicsContext::DrawBitmap()
Pass the current composition mode to wxOSXDrawNSImage() instead of
always using NSCompositeSourceOver in it.

See #23240, #23245.

(cherry picked from commit e269245b97ced95f60b11fb7ea988a3f7a993e7f with
some extra changes for ABI compatibility in 3.2)
2023-02-14 00:41:04 +01:00
Vadim Zeitlin
6e38c8081d Show run-time wxWidgets version in the minimal sample "About"
This correctly shows the version of the library being actually used when
using shared/dynamic libraries, rather than showing the version of the
library that the sample was compiled against.
2023-02-14 00:32:18 +01:00
Pavel Tyunin
74512dbc57 Add move ctor and assignment operator to wxString
This results in noticeable speed up in wxArrayString operations, as
shown by the new benchmark.

See #23224.
2023-02-14 00:30:42 +01:00
Vadim Zeitlin
2922fa0fa2 Fix drawing of icons for non-root wxTreeCtrl items
Fix y coordinate value passed to wxDC::DrawBitmap() by restoring the
parentheses accidentally removed in 6dd4e73ea3 (Add wxDrawImageBitmap()
helper and use it in wx{List,Tree}Ctrl, 2022-10-25).

(cherry picked from commit 2a13fd238ea499a3e4b089f3ca3a327e94ddb4d9)

See #23255.
2023-02-13 22:52:40 +01:00
Vadim Zeitlin
0f6dfb6369 Add missing new line before the checksums
Just a minor cosmetic fix.
2023-02-13 16:03:02 +01:00
Vadim Zeitlin
5b0518eddf Update version of action-gh-release in another place
This should have been part of 3f6e2ca578 (Update the version of
action-gh-release used, 2023-02-09).
2023-02-13 15:37:12 +01:00
Vadim Zeitlin
8353a47c9c Add a header for 3.2.3 changes section to the change log 2023-02-10 15:09:24 +01:00
Vadim Zeitlin
13451f77af Add a reminder to update the version after adding new APIs
The version will have to be changed from N:R:N to N+1:0:N+1 if/when this
happens.
2023-02-10 15:09:24 +01:00
Vadim Zeitlin
0574a81db1 Update version to 3.2.3
Change libtool-like version to 2:1:2 as no new APIs have been added yet
and rebake and regenerate configure.
2023-02-10 15:09:17 +01:00
Vadim Zeitlin
c98f9c9075 Update MSYS2 MinGW version to 12.2.0
This is the version actually used for 3.2.2 binaries.
2023-02-09 18:10:24 +01:00
Vadim Zeitlin
3f6e2ca578 Update the version of action-gh-release used
No real changes, but this updates to a commit using action/checkout@v3
which avoids warnings when running this workflow.
2023-02-09 01:27:28 +01:00
Vadim Zeitlin
4d2bd7c63b Fix typo in the README and announcement text 2023-02-09 00:31:10 +01:00
Vadim Zeitlin
01bda9242f Update release documents for 3.2.2
Fix the release date and summarize the changes since 3.2.1.
2023-02-09 00:14:01 +01:00
Vadim Zeitlin
5b89b4ae7a Update release instructions for 3.2 branch
Notably remove the confusing reference to updating the changelog which
doesn't apply to this branch.
2023-02-08 23:44:55 +01:00
Vadim Zeitlin
0d691042a5 Merge branch '3.2-locale-improve' into 3.2
Backport locale-related improvements from master to 3.2 branch, notably
fixing handling of "mixed" locales, with the region not matching its
usual language, under Mac.

This cherry-picks all commits merged into master in c4b71b3694 (Merge
branch 'default-locale-improve', 2023-02-08) except for 1cf59d345b
(Remove fallback on locale using different region under Unix,
2023-02-07) which results in a behaviour change that might not be
desired and so is omitted out of abundance of caution.

See #23119, #23147, #23226, #23114.
2023-02-08 20:52:43 +01:00
Vadim Zeitlin
a6b94325fb Don't use LC_MESSAGES for determining locale on non-glibc systems
LC_MESSAGES should only be used for getting the translations language,
so using GetLocaleFromEnvironment(), which uses its value if LC_ALL was
not set, in wxUILocaleImplUnix::InitLocaleNameAndCodeset() was wrong for
the cases when we did call it from there, i.e. when not using glibc and
so _NL_LOCALE_NAME is not defined.

Correct this by replacing GetLocaleFromEnvironment() querying all
environment variables at once with GetLocaleFromEnvVar() getting the
value from just the one environment variable specified by caller and
not calling it for LC_MESSAGES from InitLocaleNameAndCodeset().

See #23217.

(cherry picked from commit db14662116fbf433c928b0caedc1bcde54e72436)
2023-02-08 20:51:45 +01:00
Vadim Zeitlin
194cc449ef Fix GetSystemLocale() return value for "C" locale
This was broken by the recent changes, so fix it again: we do still want
to return wxLANGUAGE_ENGLISH_US for this particular locale.

(cherry picked from commit 3dfe253d3cf7f8e1bfba6b2cdb3f53628aa224df)
2023-02-08 20:51:45 +01:00
Vadim Zeitlin
00977fd545 Fail if environment variables define unknown locale under Unix
Don't always "succeed" in wxUILocale::UseDefault() and, consequently, in
wxLocale::Init(wxLANGUAGE_DEFAULT), under Unix systems, even if the
locale couldn't actually be set, as it can happen if the environment
variables contain a locale which is not supported on the current system,
e.g. a "mixed" locale such as "en_FR", or even a completely invalid
string such as "bloordyblop", which still used to succeed.

For now only fix it for reasonably modern systems with locale_t support,
it could be done even for the ancient ones without it later too if
anybody still cares about them.

See #23218.

(cherry picked from commit 2ca76449bf636b58b72fccbe5dea485b241d692d)
2023-02-08 20:51:45 +01:00
Vadim Zeitlin
7db14d492d Remove outdated special case for Mac from wxSetlocale()
This function must be used for setting the default CRT locale only and
we can't request arbitrary locales support from it under Mac as it
doesn't support any kind of mixed locales, such as "en-FR".

We do support them in wxUILocale, and calling wxUILocale::UseDefault()
from wxLocale::Init(wxLANGUAGE_DEFAULT) actually worked, but then this
function failed because wxSetlocale(LC_ALL, "") did not work for such
locales.

Fix this simply by removing Mac-specific code from this function.

This makes wxLocale::Init(wxLANGUAGE_DEFAULT) work as well as it ever
can under Mac.

(cherry picked from commit 856c0371faaf17c735efabc7708e79b68e00aaf2)
2023-02-08 20:51:45 +01:00
Vadim Zeitlin
da3ff24e93 Create valid (if empty) "C" locale under macOS
Use [NSLocale systemLocale] instead of trying to create a locale with
the name "C" which just fails and doesn't create any NSLocale at all.

If nothing else, this makes the behaviour of wxUILocale::GetCurrent()
consistent on all platforms as its GetLocaleId() now returns "C"
everywhere.

(cherry picked from commit e3146f9ac078f6095e6c93651583fcba5fd3feb2)
2023-02-08 20:51:45 +01:00
Vadim Zeitlin
1d1b13253b Add wxUILocale::GetSystemLocaleId()
This function replaces the existing GetSystemLocale() as it can
represent the locales that don't have any corresponding wxLanguage
values and for which GetSystemLocale() has no choice but to return
wxLANGUAGE_UNKNOWN.

(cherry picked from commit 14714856b3956d52ede8bcf27345fdc6efd438e9)
2023-02-08 20:51:45 +01:00
Vadim Zeitlin
17b90ee435 Return wxLANGUAGE_UNKNOWN from GetSystemLocale() in mixed locales
After the changes of the previous commit, GetSystemLocale() started
returning the language, found as due to the fallback logic implemented
in FindLanguageInfo(), for mixed locales, e.g. it would return English
for en_FR which is wrong as the actual locale is rather the French one,
using decimal comma and not period in this case.

Make it always return wxLANGUAGE_UNKNOWN for the mixed locales for now.

(cherry picked from commit 9f2a416f81f76ae23b1f1bc5644c5918c2593b43)
2023-02-08 20:51:45 +01:00
Vadim Zeitlin
d273cecbd8 Fix wxUILocale::FindLanguageInfo() to work for mixed locales
When looking for the language information, we must recognize the
language independently of the region it is followed by, so en_FR is
still English and fr_DE is still French, even if the full locale is
unknown, but this wasn't the case before.

Fix this by comparing the language part of wxLanguageInfo with just the
language of wxLocaleIdent we're trying to match, instead of comparing it
with its full BCP47 tag, which is never going to match.

(cherry picked from commit c13b3645a8825d43b48d60ad297141827b71dad6)
2023-02-08 20:51:45 +01:00
Ulrich Telle
2b02c0333c Don't ignore LC_XXX in wxUILocaleImpl::GetPreferredUILanguages()
Previously, if LANGUAGE was set, the other locale-related environment
variables (LC_ALL, LC_MESSAGES, LANG) were simply ignored, which seems
wrong as the user running the program after explicitly setting LC_ALL
expects it to use this locale and not en_US from the default value of
LANGUAGE on a typical Linux system using English.

So handle LANGUAGE as a source of supplementary information, but still
honour all the other environment variables. This goes against an
explicit GNU gettext manual recommendation, but this recommendation
seems to only make sense in the usual case, when the first element of
LANGUAGE is the same as LC_ALL/LANG value, but not when they differ.

See #23146.

(cherry picked from commit 98a9cd06880e10627868df5d11b97578ba18abca)
2023-02-08 20:51:45 +01:00