Commit Graph

71567 Commits

Author SHA1 Message Date
dafe3d11bf Merge remote-tracking branch 'remotes/upstream/master'
Signed-off-by: Simon Rozman <simon@rozman.si>
2021-11-15 10:27:47 +01:00
Artur Wieczorek
2120236a29 Implement SVG icons in wxPropertyGridManager 2021-11-14 19:16:56 +01:00
Artur Wieczorek
12af82ca38 Use wxBitmapBundle in wxPropertyGridManager
wxBitmapBundle can be used in wxPropertyGridManager to pass images
to the toolbar.
2021-11-14 19:16:00 +01:00
Stefan Csomor
91402a0de8 fixing embedded usage
when running under OSX embedded, we must NOT allocate an autorelease pool, it gets corrupted otherwise
2021-11-14 13:19:06 +01:00
Vadim Zeitlin
2ca9951357 Merge branch 'tests-readme'
Explain how to build the tests.

See https://github.com/wxWidgets/wxWidgets/pull/2586
2021-11-12 17:16:13 +01:00
Lauri Nurmi
ed92c86785 Use semicolon after wxIMPLEMENT_*_CLASS* in wx's own implementations
wxIMPLEMENT_DYNAMIC/ABSTRACT_CLASS* is documented to be used with a
semicolon, though it is not mandatory.

Not touching headers yet, to avoid -pedantic warnings in user code.

See https://github.com/wxWidgets/wxWidgets/pull/2584
2021-11-12 17:15:29 +01:00
Alexander Bisono
5cea9f4649 Change wxwin.m4 to use non-deprecated macros
`AC_HELP_STRING` and `AC_CANONICAL_SYSTEM` are deprecated past autoconf
2.70+. A quick runthrough with `autoupdate` brings `wxwin.m4` in line
with this.

Closes https://github.com/wxWidgets/wxWidgets/pull/2585
2021-11-12 17:13:34 +01:00
Maarten Bent
c220ec1022 Add new image files used in the test to CMake too
This should have been done in 20208cc81f (Fix loading bitmaps with
malformed biClrUsed field, 2021-11-05), but was forgotten there.

See https://github.com/wxWidgets/wxWidgets/pull/2583
2021-11-12 17:12:10 +01:00
Lauri Nurmi
90c20798b9 Implement wxSecureZeroMemory() for clearing memory securely
Wrap native function when possible, and fallback to a generic
implementation.

Closes https://github.com/wxWidgets/wxWidgets/pull/2582
2021-11-12 17:10:02 +01:00
Dominic Letz
4f7e09374a Fix taskbar icon size when using high DPI under macOS
Change from old `m_statusItem` API to new `[m_statusItem button]` API
because the former is now deprecated and the new one does automatic
image scaling.

Closes https://github.com/wxWidgets/wxWidgets/pull/2573
2021-11-12 17:06:58 +01:00
Vadim Zeitlin
37dbf9f03a Merge branch 'threadname' of https://github.com/lanurmi/wxWidgets
Add wxThread::SetName for naming threads for debugging purposes.

See https://github.com/wxWidgets/wxWidgets/pull/2572
2021-11-12 17:05:12 +01:00
Vadim Zeitlin
40f06a3a70 Merge branch 'ci-ccache'
Enable use of ccache for Unix CI builds.

See https://github.com/wxWidgets/wxWidgets/pull/2571
2021-11-12 17:03:13 +01:00
Carlos Azevedo
9a32d602c4 Improve wxAuiToolbar separators colour when using dark themes
Presently the colour is darker than the background, making it
essentially invisible.

Closes https://github.com/wxWidgets/wxWidgets/pull/2553
2021-11-12 17:02:31 +01:00
Maarten Bent
e917c8c6a7 Also explain how to build the tests using CMake 2021-11-12 16:53:30 +01:00
Vadim Zeitlin
46973762ba Explain how to build the tests
It may not be obvious how to build the tests, so add a section
explaining this to the existing file containing the instructions about
writing the tests and add a README to the tests directory itself to
increase chances that this file will be found -- hopefully anybody
interested in the tests will look at the README in the directory
containing them.
2021-11-12 14:21:41 +01:00
Vadim Zeitlin
6349d0b4ca Update link to the GTK stock items list in the docs
Retarget the link to developer-old.gnome.org, as this documentation is
not available on the current GTK documentation site any longer.

Closes #19316.
2021-11-11 22:39:59 +01:00
Vadim Zeitlin
cd385cf22d Trivial change to test rebuilding using ccache
Change the workflow file to trigger rebuild without affecting the other
builds.
2021-11-09 13:29:57 +01:00
Vadim Zeitlin
cffd5db562 Ignore the commit removing "$Id$" keywords for git-blame
Not sure if this is actually that useful, as this commit didn't modify
any of the still existing lines anyhow, but it seems logical to exclude
this commit, as it didn't make any real changes, but touched almost all
files.
2021-11-09 13:29:48 +01:00
Artur Wieczorek
755ee1cf10 Get rid of unnecessary casting 2021-11-07 22:39:10 +01:00
Artur Wieczorek
789b39be81 Fix deleting wxPGProperty from wxPropertyGridPageState in alphabetical mode
Categories of properties can be nested so we need to search on all category
levels for the the category wxPGProperty belongs to.
And wxPGProperty removed from the alphabetical list can be a subproperty
of another property so it's parent doesn't have to be the root of the list
and we don't have to check this with assertion.

Closed #19310.
2021-11-07 22:35:22 +01:00
Artur Wieczorek
5f0dc6cc0a Fix adding wxPGProperty to wxPropertyPageState in alphabetical mode
If given wxPGProperty is a subproperty of another property (its parent
is neither root nor category) it shouldn't be added directly
to the alphabetical list. It should be just added as a child property.
2021-11-07 22:09:05 +01:00
Artur Wieczorek
198bd1fe1f Fix setting categorized/alphabetic mode for inserted wxPropertyGridPage
State of the newly added wxPropertyGridPage should have the same
categorized/alphabetic mode like associated wxPropertyGrid.
2021-11-07 21:59:47 +01:00
David Costanzo
20208cc81f Fix loading bitmaps with malformed biClrUsed field
Stop throwing std::bad_alloc when BMP has large/negative biClrUsed by
checking that biClrUsed has a reasonable value before attempting to
allocate however much memory it indicates.

Add unit tests showing the loading such invalid bitmaps now correctly
returns an error rather than throwing an exception.

Closes https://github.com/wxWidgets/wxWidgets/pull/2583

Closes #19295.
2021-11-06 16:12:04 +01:00
Vadim Zeitlin
58d2243f7b Improve wxTE_RICH(2) styles documentation
Mention that wxTE_RICH2 should be used instead of wxTE_RICH and that it
can now be turned out automatically if the initial text is too long.

See #19303.
2021-11-06 16:00:49 +01:00
Lauri Nurmi
aace36b17f Add static SetNameForCurrent for setting name of non-wxThreads
Co-authored-by: PB <PBforDev@gmail.com>
2021-11-05 16:11:56 +02:00
Lauri Nurmi
fc756d06a6 Add wxThread::SetName for naming threads for debugging purposes
Such thread names can be shown by some debuggers, and depending on
the OS and compiler versions used, they can be visible in process
lists and crash dumps.

Co-authored-by: PB <PBforDev@gmail.com>
2021-11-05 16:11:55 +02:00
Vadim Zeitlin
590d3f1b75 Merge branch 'macos_versionname12' of https://github.com/TcT2k/wxWidgets
Recognize Windows 11 and macOS 12 in wxGetOsDescription().

See https://github.com/wxWidgets/wxWidgets/pull/2580
2021-11-05 13:58:09 +01:00
Lauri Nurmi
7c6b041469 Simplify function pointer syntax in GetPreferredUILanguage()
No need for (*func)(args), just call func(args).

No real changes.

This commit is best viewed ignoring whitespace-only changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/2579
2021-11-05 13:56:55 +01:00
PB
d7e33a5291 Extend wxMSW contributor guide
List useful wrapper classes for Windows API provided by wxWidgets.

Closes https://github.com/wxWidgets/wxWidgets/pull/2578
2021-11-05 13:56:10 +01:00
Vadim Zeitlin
cce8e41b20 Merge branch 'gtk_unknown_keys' of https://github.com/martinetd/wxWidgets
Generate wxKeyEvents even for unknown keys in wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/2576
2021-11-05 13:55:12 +01:00
Vadim Zeitlin
de3d95a7b3 Merge branch 'gtk-launch-keys'
Generate events for GDK_KEY_LaunchX keys too in wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/2575
2021-11-05 13:53:30 +01:00
Vadim Zeitlin
089b72b762 Merge branch 'msw-long-text'
Fixes for creating wxTextCtrl with long text in wxMSW.

See https://github.com/wxWidgets/wxWidgets/pull/2570

Closes #19303.
2021-11-05 13:50:20 +01:00
Tobias Taschner
69aedae382 Include Windows 11 in wxGetOsVersion() table 2021-11-05 13:07:32 +01:00
Tobias Taschner
6cef0c0464 Include Windows 11 name in wxGetOsDescription()
The major version is not changed for Windows 11 from
Windows 10, but the build number 22000 can be used to
determine it's Win 11.
2021-11-05 11:55:51 +01:00
Tobias Taschner
2c6651ef12 Include macOS 12 name in wxGetOsDescription() 2021-11-05 11:19:06 +01:00
Dominique Martinet
5f0749f4fd Document generation of WXK_NONE key events for unknown keys
Add a paragraph for keys where GetUnicodeKey and GetKeyCode both return
WXK_NONE, that GetRawKeyCode is platform specific, and that such keys
generate no wxEVT_CHAR event.
2021-11-05 09:46:53 +09:00
Vadim Zeitlin
eb6e0289d6 Make WXK_LAUNCH_x constants consecutive
No real changes, but don't complicate the constants definitions
needlessly just to avoid changing the numeric value of WXK_LAUNCH_APP
constants as nobody should rely on them anyhow.

Not doing it simplifies things and allows to condense the mapping from
GDK keys to wx ones.
2021-11-05 00:43:39 +01:00
Vadim Zeitlin
77f81bae07 Improve multimedia key constants documentation
Add "since 3.1.0" for the constants introduced back in abd46cb99a (Add
support for multimedia keys to wxMSW and wxGTK, 2016-01-08) and also for
the new constants added in the previous commit.

Also document that WXK_LAUNCH_n keys are only generated by wxGTK.
2021-11-05 00:42:46 +01:00
Dominique Martinet
61d835d8b3 wxKeyCode: add WXK_LAUNCH_[0-9A-F] for gtk bindings
X11 defines Xf86Launch[0-9a-f], which are then also defined as
GDK_KEY_Launch[0-9A-F].

Unfortunately, keys which are not mapped are just plain ignored and the
application is then not able to receive these keyboard events at all.

The original PR https://github.com/wxWidgets/wxWidgets/pull/157 mapped
only LaunchA/B to WXK_LAUNCH_APP1/2, this patch adds the whole range of
keys and keeps LAUNCH_A/B as aliases for WXK_LAUNCH_APP1/2
2021-11-02 10:18:02 +09:00
Dominique Martinet
307aaf83d8 gtk/window: cleanup dead code around wxTranslateGTKKeyEventToWx
The previous commit made wxTranslateGTKKeyEventToWx never fail, so make it void
and remove all dead code resulting from the lack of failure.
2021-11-02 10:09:28 +09:00
Dominique Martinet
33553ed141 gtk/window: generate WXK_NONE key event for unknown keys
There are still plenty of X11 keys which have no WXK mapping and might be useful
for applications to act upon.

Instead of trying to remap all of them, generate a WXK_NONE key event and let
applications deal with it using GetRawKeyCode() if appropriate.
2021-11-02 10:09:28 +09:00
Vadim Zeitlin
9cc0c9a082 Only check sizer elements if there is valid containing window
This is another correction to the changes of 62c3d921b2 (Check that all
windows in a sizer use associated window as parent, 2021-10-20): we need
to restrict the part of this check in wxSizer::SetContainingWindow() to
the case when this function argument is non-null, otherwise the check
would always fail.

Notice that it is perfectly valid to call SetContainingWindow(NULL) and
wxWrapSizer does it for every re-layout, for example.

This commit is best viewed ignoring whitespace-only changes.

See #19308.
2021-10-29 16:33:10 +01:00
Vadim Zeitlin
34f430a016 Relax the sizer parent check to account for wxStaticBoxSizer
The check added in 62c3d921b2 (Check that all windows in a sizer use
associated window as parent, 2021-10-20) didn't work correctly when
using wxStaticBoxSizer, as the windows in this sizer are grandchildren
(or possibly even further descendants, in case of nested sizers) of the
window that the sizer is associated with, with the static box being the
immediate parent.

Relax the check to account for this and to avoid triggering for any use
of wxStaticBoxSizer.

Closes #19308.
2021-10-29 01:33:48 +01:00
Vadim Zeitlin
e2a0c87f1d Merge branch 'cmake-lib-dir-fix' of https://github.com/MaartenBent/wxWidgets
CMake: Fix library directory and don't use symlinks when using MinGW.

See https://github.com/wxWidgets/wxWidgets/pull/2569
2021-10-27 23:28:23 +01:00
Vadim Zeitlin
6e96c6dda0 Add "Show build environment" step
Show version of compiler and ccache being used.
2021-10-27 23:32:16 +02:00
Vadim Zeitlin
9320aeb28b Enable use of ccache for Unix CI builds
This should speed up build step for the common case when not too many
files have to be recompiled.
2021-10-27 22:58:19 +02:00
Vadim Zeitlin
b744e271e3 Create multiline controls with wxTE_RICH2 in wxTextEntryDialog
While wxMSW now turns this style on automatically if necessary, it's
still better to avoid the failure during the initial control creation,
so enable wxTE_RICH2 from the beginning in wxTextEntryDialog, where it
shouldn't result in any incompatibilities.
2021-10-27 21:41:30 +01:00
Vadim Zeitlin
d585bb1ebd Automatically turn wxTE_RICH2 for wxMSW wxTextCtrl if necessary
When creating a wxTextCtrl with the initial text which is too long to
fit into a plain EDIT, automatically create RICHEDIT instead.

This is not perfect, e.g. it still doesn't make calling SetValue() with
long text later work, but it seems to still be preferable to failing to
create the window completely, which results in many other more difficult
to diagnose problems later.
2021-10-27 21:39:37 +01:00
Vadim Zeitlin
a8c05945b4 Log the length of the window label if creating it fails in wxMSW
This can be useful in case of unexpected window creation failure, so log
it because it doesn't cost much for something that is supposed to
practically never happen anyhow.
2021-10-27 21:38:41 +01:00
Maarten Bent
ad75a77bc6 CMake: Cleanup the wx_configure_script macro 2021-10-27 22:28:33 +02:00