Restore the old behaviour of wxLocale, which is supposed to use the
default locale and not the preferred language, which may not be the same
(see #22281).
Also apply the following fixes and improvements to wxUILocale:
- Add new GetSystemLocale() method.
- Change the MSW implementation to use the default locale instead of the
preferred UI language for Windows versions below Windows 10.
- Change the Unix implementation to respect LANGUAGE environment
variable and use it for determining the preferred UI languages.
- Use wxUILocale in wxTranslations to determine the preferred UI
languages.
- Use wxUILocale during initialization of internat sample.
Closes#22281.
Closes#22318.
MSWDefWindowProc(WM_PAINT, ...) in OnPaint causes performance issues on
large screens so only use it when an actual custom background colour is
set.
Closes#22308.
Closes#22320.
Only run install_name_tool on our own libraries as part of "make
install" instead of doing it on all libraries in the installation
directory: this was at best useless and at worst harmful, as some
combinations of install_name_tool and macOS versions don't work well
together and result in corrupting the already installed libraries.
Update ccache-action to a not yet released version including the fix for
failing the entire CI job if saving the cache failed -- this shouldn't
happen at all, but in practice it does happen from time to time, and
it's better to succeed, rather than fail in this case.
Change the minimum version to 3.0. Version 2.8.12 has never worked,
because it does not support the VERSION parameter in project().
Replace GREATER_EQUAL comparisons, these are only supported since 3.7.
Move PCH related code to a separate file, and include it after
options.cmake and init.cmake. Because only then the wxBUILD_PRECOMP
variable is fully initialized.
Closes#22312.
This reverts parts of 533958be10 (recreating Xcode project files with
new script, 2022-04-16) that seem to have been committed accidentally
and are now preventing CI builds from passing.
This function returns wxBitmap by object, not by (const) reference since
wxBitmapBundle-related changes.
Also change signature of the other methods taking wxBitmapBundle instead
of wxBitmap now.
And some other minor improvements.
Closes#22306.
Fix declaration of 'o' hides previous local declaration warnings.
Change two wxCONSTRUCTOR_5 definitions using wxBitmapBundle instead of
wxBitmap (this does not give build errors).
wxGenericCalendarCtrl is missing all XTI implementations, so just use
RTTI. And fix building the xti sample.
Note the shared build still fails due to WXDLLIMPEXP related issues.
Closes#22300.
Closes#22301.
Use version comparison instead of normal comparison for libnotify.
Fix warning if mismatched if statement in FindGNOMEVFS2.
Check for GREATER_EQUAL GTK versions, same as configure does.
Don't check for GTK 1 or define __WXGTK127__. CMake does not support GTK1 and it should not be defined when GTK 2/3/4 is used.
Using LogEnabler in wxFileSystemWatcher test case still didn't show
anything even in case of unexpected failures because debug messages
didn't appear in the test output.
Fix this by using a custom log target which shows the debug (and trace)
messages on stderr, instead of using the debug output for them, even
under MSW.
Also make LogEnabler public, and rename it to a more unique name, as it
could be useful in the other tests too.
Don't test for __WXMAC__ after testing for __UNIX__ just above, as the
latter is now always defined when the latter is, we don't support
non-Unix Mac systems since an awfully long time.
No real changes.
Consider that all still supported/existing platforms provide these
declarations, if they provide these functions at all (and they probably
all do, so we almost certainly could remove all the test for them, but
keep them for now).
Note that we still test for broken declarations as this might still be
useful on HP-UX 11 systems, where this problem was reported "only" 8
years ago.
By not using AC_CHECK_FUNCS() we avoid the problem when using it with
snprintf() when cross-compiling with the latest MinGW API headers, see
https://sourceforge.net/p/mingw-w64/bugs/935/ for more details.
This commit is best viewed ignoring whitespace-only changes.
Use wxChar in wxUILocaleImplLCID to allow the code to compile and work
correctly even when GetLocaleInfo() is GetLocaleInfoA() and not the W
version as usual.
Closes#22299.
Compiling .mm files gives error 'Objective C file was disabled in PCH but is currently enabled'.
Enable the OBJCXX language so the Objective-C++ compiler will be detected and used for .mm files instead of the c++ compiler.
Detect if there are .mm files and enable PCH for them too.
Don't set COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS when cotire is not used.
This ctor was previously present only in wxMSW, make it available in all
ports to allow the same code to compile everywhere.
In most of them wxDC argument is simply ignored, but in wxGTK and wxOSX
it is used to assign the appropriate scale factor for the new bitmap.
Enable previously wxMSW-only unit test checking for this.
This is similar to db6d565fad (Handle wxDC scale factor in wxBitmap ctor
taking wxDC in wxMSW, 2022-04-10), but for the constructor taking
wxImage and wxDC -- it should also use the DC scale factor, even if it
is not used for scaling the bitmap size in this case.
Add a unit test checking for this.
This is similar to 7382e99bbb (Create bitmaps even when given a wxDC
without an HDC in wxMSW, 2022-04-10) and does the same change to
wxBitmap ctor from wxImage and wxDC -- and also extends the unit test to
check for this under wxMSW, which is the only port in which this ctor is
currently available.
Add all of the CMake related files together in one group/filter.
This includes the CMakeLists.txt of the project, cmake_pch.[hxx,cxx] when
using CMake's precompiled header feature, and a .rule file created by cotire.
Also include manifest files in the Resource group. Even though they are not
visible (in VS2022), they would create an empty MSW Headers group for samples.
Remove unused CMake code to get number of mono source files.
wxUSE_BASE=1 is also defined in wx_set_target_properties.
There seems no reason to define _LIB and DLL_EXPORTS, wx does not use it. They
were probably added because the vcxproj files have them.
Keep using cotire for CMake versions older than 3.16, or when user specifies wxBUILD_PRECOMP=COTIRE.
The scintilla headers need to be specified for target_precompile_headers to work.
Enable it when the target has at least 2 source files (same as cotire does).