Commit graph

75047 commits

Author SHA1 Message Date
Vadim Zeitlin
45dc55b047 Merge branch 'wxrc-multi-bitmap'
Support multiple bitmaps in <bitmap> elements in wxrc.

See #23795.
2023-08-24 02:51:51 +02:00
Vadim Zeitlin
55c704a1b4 Pin httpbin to the previously working 0.7.0 version
The recently released 0.10.0 doesn't seem to have any actual changes but
has new dependencies which broke the previously working builds.

Closes #23800.
2023-08-24 02:51:16 +02:00
Samuel Thibault
62f75c235d Fix DynamicLibrary::Load() test for less common platforms
alpha and ia64 use libc.so.6.1, GNU/kFreeBSD uses libc.so.0.1, and
GNU/Hurd uses libc.so.0.3, so check for these versions too in addition
to 6 and 7 used under x86 Linux.

Closes #23801.
2023-08-24 02:49:31 +02:00
PB
547d49f68b Fix typo in wxColourDialog documentation
The code example in wxColourDialog documentation used
a wrong type to create wxColourDialog instance.

Closes #23793.

Closes #23794.
2023-08-24 02:42:39 +02:00
PB
af453674b6 Improve wxFileSystem::AddHandler() documentation
The note in the method description incorrectly stated that
"...the handlers are deleted in wxFileSystem's destructor so
that you don't have to care about it." However, unless a
handler is removed by calling wxFileSystem::RemoveHandler()
(or undocumented wxFileSystem::CleanUpHandlers()), it is deleted
only when wxWidgets shuts down in wxFileSystemModule::OnExit().

Update the method documentation that it is correct (and similar to
that of wxImage::AddHandler()).

Closes #23789.
2023-08-24 02:38:51 +02:00
Kvaz1r
d282cc9657 Fix creating wxRadioBox with no items in wxUniv
Don't select the first item if there are no items at all.

Closes #23784.
2023-08-24 02:31:22 +02:00
Carlo Bramini
15d7aaaa50 Fix wxLocale::GetInfo() unit test under Cygwin
Use the French date format expected by Cygwin CRT which differs from the
one used by MSVC.

Closes #23782.
2023-08-24 02:25:25 +02:00
Carlo Bramini
1bc8631b52 Fix DynamicLibrary::Load unit test under Cygwin
While running the test_base on CYGWIN, this message will be printed on the console:

-------------------------------------------------------------------------------
DynamicLibrary::Load
-------------------------------------------------------------------------------
/cygdrive/c/Users/carlo/Documents/GitHub/wxWidgets/tests/misc/dynamiclib.cpp:26
...............................................................................

/cygdrive/c/Users/carlo/Documents/GitHub/wxWidgets/tests/misc/dynamiclib.cpp:80: warning:
  Couldn't find libc.so, skipping DynamicLibrary::Load() test.

/cygdrive/c/Users/carlo/Documents/GitHub/wxWidgets/tests/misc/dynamiclib.cpp:84: warning:
  Possible candidates:
  /lib/libc.a
  /usr/lib/libc.a

CYGWIN uses NEWLIB as C library and it is compiled into cygwin1.dll.
This patch adds the right test case for CYGWIN, for letting the execution of the test.

Closes #23781.
2023-08-24 02:24:16 +02:00
PB
61bae154d3 Improve samples appearance in dark mode
- caret: Use the system color for window background instead of
  hard-coded white.

- image: Use hard-coded black for the text drawing since all other
  drawings on the image canvas use hard-coded colours too. The default
  text colour was barely readable in dark mode.

- joytest: Use wxCYAN_PEN instead of wxBLACK_PEN to ensure the line is
  visible both in light and dark colour system mode.

- ownerdrw: Use such background colour that there is good contrast
  between text and background both in light and dark colour system mode.

- popup: Use such background colour for the pop up so that there is a
  good contrast between text and background both in light and dark
  colour system mode.

Closes #23773.
2023-08-24 02:22:19 +02:00
Vadim Zeitlin
9e8ab658fe Add MSVS 2022 solution file for wxrc too
Add another manually created solution file, after adding the solutions
for MSVS 2017 and 2019 in cfe4a10995 (Add manually created MSVS 201x
solutions files for wxrc, 2019-01-07) to make it possible to build wxrc
with MSVS 2022 easily too.
2023-08-23 23:24:40 +02:00
PB
9536583c0f Improve the combo sample
In the dialog, create the controls put in the static box sizer
with the sizer's static box as the parent instead of the dialog.

Improve appearance of custom drawn items in dark mode.

Closes #23765.
2023-08-23 23:08:52 +02:00
PB
ecd01698e7 Document more MSW dark mode limitations
Add that anything using task dialog does not support dark mode.

Mention that most common dialogs do not support dark mode.

Mention that calling wxMenu::Break() will turn the menu light.

Closes #23769.
2023-08-23 23:08:15 +02:00
Vadim Zeitlin
ab88fecdc5 Add support for multi-resolution bitmaps to wxrc
Handle multiple semicolon-separated paths in <bitmap> elements which are
used to provide several versions of the same bitmap in different
resolutions.

This commit is best viewed ignoring whitespace-only changes.
2023-08-23 18:03:03 +02:00
Vadim Zeitlin
13d8adb4e1 Improve error reporting for IO errors in wxrc
Notably, give a clear error if an input file is not found and also check
that the temporary output file could have been written successfully.

Still continue handling the other files even if some of them couldn't be
found in order to give all errors at once if there is more than one
missing file.
2023-08-23 17:58:48 +02:00
Vadim Zeitlin
5d630caabd Make it enough to predefine only wxUSE_DPI_AWARE_MANIFEST
If this is predefined before including wx/msw/wx.rc, it clearly
indicates that wx manifest should be used, but this was _not_ the case
before as wxUSE_RC_MANIFEST could be predefined as 0 (which is the case
for MSVS, to avoid conflicting with the manifest embedded by it into the
executable by default).

Change this and do include the wx manifest if wxUSE_DPI_AWARE_MANIFEST
is defined.
2023-08-23 16:18:05 +02:00
Lauri Nurmi
3e4946fc31 Minor documentation syntax and orthography fixes
Closes #23759.
2023-08-22 19:20:33 +02:00
Scott Talbert
3ae3a4e1f5
Support using Numpad Enter for ending wxListCtrl editing (#23762)
Fixes #23761.
2023-08-12 16:04:26 -07:00
Paul Cornett
55d0b594ff Avoid division-by-zero when vertical scrollbar is disabled
See #23763
2023-08-12 15:54:39 -07:00
Maarten Bent
d847f3b039
Fix position of label window in wxStaticBox after DPI change
Fixes #23740
2023-08-05 21:54:01 +02:00
Vadim Zeitlin
a4dec24c6d Mention behaviour change of wxDC::GetContentScaleFactor()
Complete changes of 5e7b08f9ea (Correct wxDC::GetContentScaleFactor()
documentation, 2023-04-13) to add the information about the version in
which the behaviour of this function changed, as it was already done in
the version of this commit cherry picked to 3.2 branch, i.e. 8094ed5795
(Correct wxDC::GetContentScaleFactor() documentation, 2023-04-13).

Closes #23748.
2023-08-02 04:08:13 +02:00
Vadim Zeitlin
a42d9181d6 Define LOCALE_RETURN_GENITIVE_NAMES for old MinGW support
Some (very) old MinGW versions, such as 5.3.0 used on AppVeyor CI for
3.2 builds, don't provide the definition of this constant, so do it
ourselves.

See #23747.
2023-08-02 04:08:05 +02:00
Vadim Zeitlin
104b178cd7 Merge branch 'enable-stc-test'
Enable wxSTC tests in static builds too after fixing the problems
preventing them from linking there.

See #23744.
2023-08-01 01:35:10 +02:00
PB
350222e411 Correct wxBUILD_TESTS CMake build options in unit tests docs
Provide the correct options for wxBUILD_TESTS in the CMake part
of unit tests documentation.

Closes #23745.
2023-07-31 19:18:18 +02:00
Vadim Zeitlin
ec4777bbbf Rebake after the previous commit
This just separates the automatically-generated changes from the manual
ones in the parent commit.
2023-07-29 18:13:29 +02:00
Vadim Zeitlin
d509d534dd Don't define LIB_LEXILLA and LIB_SCINTILLA when USE_STC==0
This avoids link when building the tests in configure-based CI builds
using --disable-stc.
2023-07-29 18:12:09 +02:00
Vadim Zeitlin
7d362c3fca Enable wxStyledTextCtrl unit test in static builds too
It should link there too now after the previous commits.
2023-07-29 16:01:33 +02:00
Vadim Zeitlin
994bbe51a7 Link with stc directly in the test bakefile
There doesn't seem any reason not to do it, so do the same thing as is
done in the stc sample and which seems to work there.
2023-07-29 16:01:33 +02:00
Vadim Zeitlin
a44fe10e32 Link with Scintilla libs in the MSVS test project
They are required by wxStyledTextCtrl tests.
2023-07-29 16:01:33 +02:00
Vadim Zeitlin
e8fdb66741 Merge branch 'improve-configure'
Modernize configure.

See #23730.
2023-07-28 13:25:52 +02:00
Stefan Csomor
30fbb94053 Send key down events ourselves if macOS didn't do it
Set a flag in insertText and send wxEVT_KEY_DOWN ourselves from
DoHandleKeyEvent() if it wasn't set to ensure that we generate these
events for the keys ignored by the standard insertText, such as
⌘+⎇+Letter combination.

Closes #23671.

See #23699.
2023-07-28 13:24:51 +02:00
Vadim Zeitlin
e38bc95548 Synchronize config.* files in submodules with top-level repository
Use the same versions of config.{guess,sub} in the submodules where they
are used (so not in src/{jpeg,png}) as in wx itself to avoid any
confusion due to using different architecture names in the main
configure and subconfigure (e.g. aarch64-apple and arm-apple for M1).

Closes #23739.
2023-07-27 17:14:48 +02:00
Vadim Zeitlin
703d815ef8 Make configure message for zlib consistent with the other ones
All the other messages use "system $LIBRARY not found", and just zlib
didn't use "system" for some reason -- add it now so that the messages
are consistent when several of them are given.

This is a purely cosmetic changes.
2023-07-24 18:18:05 +02:00
Vadim Zeitlin
f03ea82be8 Merge branch 'im/stringview' of https://github.com/imciner2/wxWidgets
Add std::string_view constructors to wxString.

Also improve C++17 standard headers detection for MSVS.

See #23711.
2023-07-24 18:16:39 +02:00
Ian McInerney
b8d3b37c9e Add new macro for standard library header inclusion
Newer standard library headers should only be included when the compiler
is targetting that standard, otherwise some compilers (like MSVC) will
warn that you are using a newer C++ include on an older version.
2023-07-24 16:54:14 +01:00
Vadim Zeitlin
414140113c Merge remote-tracking branch 'github/egl-wayland-perf-fix'
Fix wxGLCanvas performance when using Wayland.

See #23554.
2023-07-24 17:41:35 +02:00
Vadim Zeitlin
0436cebd82 Fix recently broken assert for virtual wxGenericListCtrl
The changes of 8c1234ea66 (Improve assert checking line index validity
in wxGenericListCtrl, 2023-07-24) were wrong for virtual list controls
as the lines vector is not used for them, so restrict the assert to the
non-virtual case only.
2023-07-24 15:23:40 +02:00
Vadim Zeitlin
66cb7089f8 Add logging to wxGTK wxTopLevelWindow size-related functions
This can be helpful when debugging size-related problems and doesn't do
any harm as long as the corresponding tracing category is disabled.
2023-07-24 14:04:56 +02:00
Vadim Zeitlin
08c3d09e51 Avoid debug warnings when defocusing menu bar in wxGTK
At least under Wayland, removing focus from the menu consistently
results in "window lost focus even though it didn't have it" debug
messages because wxMenuBar never gets any focus-in signals but does get
focus-out one.

Avoid this by just not connecting handlers for these signals at all, as
we don't need them for wxMenuBar which isn't supposed to generate any
focus events anyhow.

See #23726.
2023-07-24 14:04:36 +02:00
Vadim Zeitlin
484c98ffb2 Avoid double quoting assert message conditions
wxFAIL_COND_MSG_AT() macro was already passed a quoted string, there is
no need to quote it again.
2023-07-24 14:03:34 +02:00
Vadim Zeitlin
d6dd0ebb6e Fix deleting selected item in wxGenericListCtrl
This didn't update the number of selected items, which resulted in other
problems later on, including accessing items with invalid index which
could lead to a crash.

Closes #23729.
2023-07-24 14:03:34 +02:00
Vadim Zeitlin
8c1234ea66 Improve assert checking line index validity in wxGenericListCtrl
Don't just check that the index is not -1, but also that it's valid,
which can catch other problems.

Also replace the ASSERT with CHECK to avoid dereferencing invalid
pointer, it's better to crash when trying to dereference a NULL one.
2023-07-24 14:03:34 +02:00
Vadim Zeitlin
d0ebba6f68 Increase required autoconf version to 2.69
This is pretty ancient by now (released 2012-04-24) and anything older
than it is really unlikely to be used on any development machine.
2023-07-24 00:12:05 +02:00
Vadim Zeitlin
a921f558d9 Remove configure.in to configure.ac
This is the extension expected by all non-ancient autoconf versions.
2023-07-24 00:11:26 +02:00
Maxim Cournoyer
5c3a41139c build/autogen.mk: Register missing bakefiles. 2023-07-24 00:11:26 +02:00
Vadim Zeitlin
9452f6b982 Remove frozen autoconf macros version a.k.a. "auto hacks"
This hasn't been maintained since 2007 and doesn't seem to be really
needed as using and not using them results in the same output currently.
2023-07-24 00:11:26 +02:00
Vadim Zeitlin
00960b40b9 Replace obsolete AC_TRY_XXX macros with AC_XXX_IFELSE
No real changes, just avoid warnings from autoconf 2.71 when
regenerating configure.

Note that double brackets must be used around any code using brackets to
preserve them during the expansion.
2023-07-24 00:11:23 +02:00
Vadim Zeitlin
04f7e0664b Replace AM_PATH_GTK_N_0() macros with use of PKG_CHECK_MODULES()
There is no reason not to use pkg-config nowadays and this allows to get
rid of some third-party m4 files, which is always nice, and avoids
warnings about GTK 3 and 4 macros being obsolete when regenerating
configure with autoconf 2.71.
2023-07-24 00:00:18 +02:00
Vadim Zeitlin
45ab9f5646 Replace obsolete AC_PROG_CC_C99 with just AC_PROG_CC
No real changes, the macros are identical, but AC_PROG_CC_C99 warns
about it being obsolete.
2023-07-24 00:00:03 +02:00
Vadim Zeitlin
e34b5c5adc Remove unused m4 files and regenerate aclocal.m4
Some of autoconf macros are not used any longer, so get rid of them.
2023-07-23 23:59:57 +02:00
Vadim Zeitlin
57c71a4547 Only include Scintilla libraries in wx-config --libs if needed
Don't always output -lscintilla and -llexilla in wx-config --libs, as
they are not needed unless linking with wxstc library is requested but
204bc3c887 (Fix linking of wxscintilla in static monolithic build,
2017-12-06) added them unconditionally.

Improve this by putting them in a separate WXCONFIG_STC_LIBS instead of
WXCONFIG_LIBS used for all libraries (even wxbase, which is wrong on its
own).

Also see #23643.
2023-07-23 02:35:53 +02:00