Commit Graph

72939 Commits

Author SHA1 Message Date
Yuri Chornoivan
62d604747e Update Ukrainian translations for 3.2.0 2022-06-23 21:14:04 +02:00
Paul Cornett
bf6fe7f949 Fix Cairo version check
The intention was to check for 1.10, not 1.12
2022-06-22 08:01:06 -07:00
Vadim Zeitlin
ae0e4c6942 Merge branch 'update-version-3.2'
Update version to 3.2.

See #22527.
2022-06-21 23:09:48 +02:00
Vadim Zeitlin
d07d89bc6c Only use CAIRO_OPERATOR_DIFFERENCE with Cairo >= 1.10
This operator was only added in this version, so at least avoid build
errors when using older Cairo versions.
2022-06-21 23:09:12 +02:00
Ulrich Telle
d8e82946a6 Fix wxUILocaleImplUnix::GetLocalizedName() on non-Linux systems
On non-Linux-like systems the `_NL_*` symbols for retrieving localized
strings from a locale are typically not available, causing compile-time
errors.

We now check for Linux-like systems, and resort to accessing our own
language database otherwise.

Closes #22558.
2022-06-21 14:26:50 +02:00
Lauri Nurmi
d2094440e4 Silence warnings about unused variables on SunOS
No real changes.

Closes #22556.
2022-06-21 14:24:45 +02:00
Vadim Zeitlin
1f32fe4d3b Avoid using TAB for indent in a HOWTO 2022-06-21 00:55:30 +02:00
Vadim Zeitlin
cb7cefcc87 Update the required wx versions in the sample CMakefile
Also add this file to the list of files to update.
2022-06-21 00:55:25 +02:00
Vadim Zeitlin
2a2308d5ed Update version to 3.2.0 and rebake and rerun autoconf
Update all make/project files to use 3.2.0.
2022-06-21 00:54:26 +02:00
Vadim Zeitlin
03293ae8e2 Update release documents for 3.2.0
The main change is that it's now described as the new stable release and
not a development one any more.
2022-06-21 00:54:26 +02:00
Vadim Zeitlin
434f9647dc Add change log for 3.2.0
List the changes directly instead of using Git notes for them under the
optimistic assumption that there won't be that many changes.
2022-06-21 00:54:26 +02:00
Vadim Zeitlin
b20d69685a Merge branch 'cmake-config-file' of github.com:MaartenBent/wxWidgets
CMake: Create a config file for use with find_package and use it for
building our own sample, as the config file has the advantage of working
with wx 3.2.0 too, unlike the existing FindwxWidgets.cmake.

See #22536.
2022-06-21 00:07:11 +02:00
Vadim Zeitlin
c639226543 Merge branch 'dvc-model-simplify'
Simplify defining classes inheriting from wxDataViewModel.

See #22553.

Closes #17755.
2022-06-20 00:42:54 +02:00
Vadim Zeitlin
c92e746f66 Fix creating wxBitmap of depth 32 but without real alpha in wxMSW
This worked until 7e9afad53a (Add real support for monochrome bitmaps to
wxMSW, 2020-10-19) because we always created the DIB of the depth
matching the alpha presence, i.e. 32bpp only if alpha was used and 24bpp
otherwise, but since this change we can use different depths, and hence
different number of bytes per pixel, for the source and destination
pixel data and so need to account for it.

An alternative fix could be to still create 24bpp DIBs even when depth
of 32 is explicitly requested, as it was done before, but it's probably
better to respect the explicitly specified depth, even if, admittedly,
it's not really clear what, if any, effect does this have in practice.

See #22552.

Closes #22548.
2022-06-20 00:42:21 +02:00
Vadim Zeitlin
b3b5c8a670 Fix wxWebResponse::GetHeader() and GetURL() in wxMSW
These functions returned strings of wrong size, with some junk after the
end of the actual string, due to a confusion between the size of the
buffer in bytes used by the WinHTTP functions and the length of the
buffer in (wide) characters used by wxWCharBuffer.

Fix this and add a unit test checking that the expected header is
returned.

See #22549.

Closes #22181.
2022-06-20 00:41:13 +02:00
Vadim Zeitlin
8872a77d66 Merge branch 'splitter-invisible-sash'
Make wxINVERT logical function work in at least some circumstances with
wxGTK3/X11 and use this to make wxSplitterWindow and wxSashWindow
separator visible during resizing.

See #22546.

Closes #16890.
2022-06-20 00:38:55 +02:00
Vadim Zeitlin
171f9ab8f4 Make wxBitmap::HasAlpha() and UseAlpha() available in all ports
HasAlpha() was already available in most of them, now ensure that it's
present in all of them, especially as it has a reasonable default
implementation.

UseAlpha() was only present in wxMSW and wxOSX and still remains only
implemented there, but provide at least a stub for it elsewhere as well
to avoid problems such as that of #17393.

See #22545.

Closes #17397.
2022-06-20 00:38:09 +02:00
Randalphwa
09b2488577 Add support for empty call size to wxGridBagSizer XRC handler
Add empty_cellsize property.

Closes #22541.
2022-06-20 00:36:47 +02:00
Randalphwa
a0bdcc0d0f Support additional wxWizard properties in XRC
Add support for border, bitmap placement, minimum width and background.

Closes #22539.
2022-06-20 00:35:32 +02:00
Vadim Zeitlin
237f0c640e Merge branch 'unix-default-locale-fixes'
Fix handling of wxLANGUAGE_DEFAULT and other improvements in Unix
wxUILocale implementation.

See #22538.

Closes #22526.
2022-06-20 00:33:55 +02:00
Martin Srebotnjak
8e5dd5baa9 Update Slovenian translations for 3.2.0 2022-06-19 22:31:10 +02:00
James Pan
d24b6e6db6 Make zh_TW translations more consistent with zh_CN ones 2022-06-19 22:29:20 +02:00
Vadim Zeitlin
a7c09c0c3d Get default locale name from environment as a fallback
If _NL_LOCALE_NAME is unavailable, set the locale name to some non-empty
string to make it at least somewhat useful -- and to avoid calling
InitLocaleNameAndCodeset() again and again.
2022-06-19 22:23:10 +02:00
Vadim Zeitlin
3a94ba6b1f Refactor: extract existing code into GetLocaleFromEnvironment()
Create a reusable function that can be used not only in
GetPreferredUILanguages() itself.

No real changes yet.

This commit is best viewed with Git --color-moved option.
2022-06-19 22:22:08 +02:00
Vadim Zeitlin
fe88494966 Remove unnecessary TempLocaleSetter::m_localeId
We don't need to store this string, we don't need it after the ctor.

Also change the default value of an argument of wxString reference type
to be a wxString, not a const char*.
2022-06-19 22:00:54 +02:00
Vadim Zeitlin
db588c53f2 Rename TempDefautLocaleSetter to TempLocaleSetter
Now that this class can be used to switch to any locale, having
"Default" in its name is not really appropriate any more.
2022-06-19 21:56:41 +02:00
Ulrich Telle
959b300fc0
Fix CI build error Ubuntu 18.04 wxGTK 3 with clang 2022-06-19 20:00:22 +02:00
Ulrich Telle
443c2f4339
Configure TempDefautLocaleSetter
If `locale_t` support is not available, set temporarily the locale using the locale name of this instance.
2022-06-19 13:05:45 +02:00
Ulrich Telle
e0e34fcb1f
Make TempDefaultLocaleSetter configurable
If `locale_t` support is not available, it is necessary to be able to temporarily set a specific locale, not only the default user locale.
2022-06-19 12:44:56 +02:00
Vadim Zeitlin
e0319a9dfb Always use a valid locale_t in wxUILocaleImplUnix
Don't attempt to optimize handling of the default and "C" locales as
this just results in bugs when using them and always use a valid
m_locale when extended locale support is available at all.
2022-06-19 03:13:57 +02:00
Vadim Zeitlin
21945f95fc Check that _NL_LOCALE_NAME is available before using it
This symbol is not portable, so check for its availability before using
it.

Also avoid using wxLocaleIdent::GetName() uselessly if we're going to
overwrite it anyhow.
2022-06-19 03:02:56 +02:00
Vadim Zeitlin
f1402c2fcd Simplify wxUILocaleImplUnix::InitLocaleNameAndCodeset()
Use TempDefautLocaleSetter helper to change the locale if necessary and
just use our own m_locale if extended locale support is available. This
allows to reuse the existing GetLangInfo() function instead of
duplicating it here.

No real changes.
2022-06-19 03:00:08 +02:00
Vadim Zeitlin
37c7e2e96c Create helper TempDefautLocaleSetter class
Extract the existing code for temporarily changing the global locale
into a reusable class.

No real changes.
2022-06-19 02:58:47 +02:00
Vadim Zeitlin
1dc1e7c20e Improve inexact comment describing wxUILocaleImplUnix::m_locale
It is null not only for the default locale (i.e. the one inherited from
the environment) but also for the "C" locale when it's created
explicitly.
2022-06-19 02:37:16 +02:00
Vadim Zeitlin
20510987f9 Initialize wxUILocaleImplUnix name and codeset on demand
It doesn't seem necessary to always initialize them when the locale is
created, especially considering that this may have side effects if we
have to change the global locale to do it.

No real changes yet.

This commit is best viewed with Git --color-moved option.
2022-06-19 02:30:27 +02:00
Vadim Zeitlin
aedd4ca847 Add a test for wxLocale::IsAvailable(wxLANGUAGE_DEFAULT)
This must always returns true.
2022-06-19 02:13:48 +02:00
Ulrich Telle
adc7b31c0b
Introduce helper function IsDefaultCLocale 2022-06-18 23:01:48 +02:00
Ulrich Telle
5b4208de78
Determine locale name and codeset in ctor
For all use cases the locale name and the codeset are now determined in the `wxUILocaleImplUnix` ctor.
If `locale_t` support is not available, the use of explicit locales with `wxUILocale` will be problematic.
2022-06-18 22:51:54 +02:00
Vadim Zeitlin
04d6353b18 Formally deprecate wxDataViewModel::GetColumn{Count,Type}()
While there is no real harm in keeping them, it still seems better to
tell people that they're not needed.

Don't put them inside WXWIN_COMPATIBILITY_3_0 for now, however:
considering how late in 3.2 development this deprecation comes, it seems
better to wait until after it and then use WXWIN_COMPATIBILITY_3_2
instead.
2022-06-18 19:21:26 +02:00
Vadim Zeitlin
dbd211dbc2 Don't require overriding wxDataViewModel::GetColumn{Count,Type}()
Neither of these methods was actually ever used after the changes of the
last two commits (and they hadn't been used when not using wxGTK even
before), so don't force the user-defined model classes to override them.

Also stop using them, as the stub versions don't return correct values
any longer.

Still keep the virtual functions in the base class for compatibility
however as it doesn't cost us much and avoids breaking the existing code
using "override".
2022-06-18 19:19:16 +02:00
Vadim Zeitlin
f6d9c13e11 Stop using wxDataViewModel::GetColumnCount() in wxGTK code too
We must use wxDataViewCtrl::GetColumnCount() instead, as using the model
column count was just wrong if the control didn't use all of the model
columns.
2022-06-18 18:23:17 +02:00
Vadim Zeitlin
72171059b4 Stop using wxDataViewModel::GetColumnType() in wxGTK code
We don't seem to really need it as we can just convert everything to
strings and this will allow to remove the requirement to override it in
the derived model classes.

This commit is best viewed ignoring whitespace-only changes.
2022-06-18 18:23:11 +02:00
Vadim Zeitlin
8536c9d683 Fix typo in wxART_STOP definition in GTK art provider
This should have been part of the grandparent commit but was forgotten
there.

See #22550.
2022-06-18 18:13:12 +02:00
Maarten Bent
94262cad6a Fix warnings in MinGW build
Closes #22551.
2022-06-18 17:52:53 +02:00
Vadim Zeitlin
af113afabf Add wxART_REFRESH and wxART_STOP to GTK art provider
This provider is supposed to have all the icons that the Tango provider
has because this is the justification for turning off support for the
latter when using wxGTK, see logic for setting wxUSE_ARTPROVIDER_TANGO
in configure.in, but it didn't provide two of the recently added ones.

Do add them and also add a reminder to Tango provider code to ensure
this doesn't happen again.

Closes #22550.
2022-06-18 17:49:25 +02:00
Paul Cornett
33c2de748a Avoid assertions from wxGtkImage when bitmap is missing
See #22550
2022-06-18 08:09:25 -07:00
Maarten Bent
978271ee81 CMake: Support target files of multiple builds
For example vc_lib, vc_x64_lib, vc_dll, vc_x64_dll, gcc_lib and gcc_dll all in
the same installation location. Disable the architecture (32 vs 64 bit)
compatibility check in the version file.
2022-06-18 17:06:16 +02:00
Maarten Bent
818135942f CMake: Set correct variable in AppVeyor build
CONFIG mode uses the <packageName>_DIR variable.

CMake has an error when generating the solution because the
lib/vc_x64_dll/mswud directory does not exist; it is not built and installed.
So only add the used configuration.
2022-06-18 17:06:16 +02:00
Maarten Bent
629866d71b CMake: Use find_package with CONFIG mode in the minimal sample 2022-06-18 17:06:15 +02:00
Maarten Bent
f6631a3d6a CMake: Create a config file for use with find_package
The config file uses the wxWidgetsTargets file to find all the libraries that
can be linked to.

It supports checking for components (e.g. base, core, aui, gl) and fails if a
requested component is not found.

Set the version compatibility to SameMinorVersion (when CMake supports this),
because different minor wxWidgets versions (3.0 and 3.1/3.2) are expected to
break API.

Because the default libraries are named like wx::wxname, create an alias that
is just called wx::name. CMake older than 3.18 does not support creating an
alias to non-global imported targets, so manually create a library with the
same properties.

The wxWidgets CMake build only builds the Release and Debug configurations, but
when creating a (MSVC) CMake project it also contains MinSizeRel and
RelWithDebInfo configurations. By default these seems to use the Debug
libraries, causing build errors. Map them to the Release libraries instead.

Also create a wxWidgets_LIBRARIES variable that can be used to link with, so
users can keep using the same variables from FindwxWidgets.
2022-06-18 17:06:15 +02:00