Commit graph

73078 commits

Author SHA1 Message Date
Artur Wieczorek
8a64c8abdc Remove v2.8 compatibility flag, add v3.2 flag 2022-08-02 08:26:04 +02:00
Maarten Bent
667c5c843b CMake: Improve linking with OpenGL libraries
Don't replace OPENGL_LIBRARIES, but prepend existing targets too it.
Also add OPENGL_EGL_INCLUDE_DIRS to OPENGL_INCLUDE_DIR.

See #22649.

Closes #22677.
2022-07-30 15:02:34 +02:00
Aldo Mazzeo
20463b2e69 Replace raw stat/lstat with wx macros
This is shorter, more clear and more portable.

No real changes.

Closes #22670.
2022-07-30 15:01:27 +02:00
Vadim Zeitlin
6ed6d97bfe Don't use system libcurl under Mac with --disable-sys-libs
It doesn't seem right that the system zlib (installed by e.g. MacPorts)
can be picked up by configure even when --disable-sys-libs is specified,
so disable its use under Mac, as libcurl is optional there.

Still use the system libcurl under Linux in the same case, however, as
it's required to have wxWebRequest at all there and dependency on it is
not really a problem in practice.

This commit is best viewed with Git --color-moved
--color-moved-ws=ignore-all-space -w options.
2022-07-30 15:00:27 +02:00
Vadim Zeitlin
57bf9c5af5 Escape all "__" in Doxygen to preserve them in the output
New version of Doxygen interprets __foo__ as Markdown markup and
consumes the underscores, which mangles the identifier.

Prevent this from happening by escaping the leading underscore for all
occurrences of "__" outside of the code blocks, this seems to be the
least intrusive fix.

See #22671.
2022-07-30 14:56:23 +02:00
valid-ptr
0e57ed1851 Fix regression in AUI floating pane positioning when dragging
Fix position updating broken since the recent changes of e777a82bfd (Fix
AUI floating position mismatch, 2022-05-25).

See #22533.

Closes #22651.
2022-07-25 15:57:06 +02:00
Vadim Zeitlin
7bfad4984c Make generic wxListCtrl lines more visible
Use wxSYS_COLOUR_GRAYTEXT, as wxSYS_COLOUR_3DLIGHT is not visible at all
on the default white background under macOS and is barely visible with
the default GTK theme.

On the flip side, it's too bright in the dark themes, but this is,
arguably, better than not being visible at all.

See #22664.
2022-07-24 19:13:21 +02:00
Vadim Zeitlin
43d0eb48c1 Merge branch 'cmake-install'
Fix problems with CMake install target: handle DESDIR and spaces in the
installation path correctly.

See #22660.
2022-07-24 17:09:32 +02:00
Maarten Bent
600bf54a06 Use DESTDIR when creating symlinks in CMake install
Prepend $ENV{DESTDIR}, sufficiently escaped to delay its expansion until
the execution of "cmake -E create_symlink" command, to the command path
arguments.

Closes #22653.

See #22610.
2022-07-24 17:06:12 +02:00
David Connet
5477d4faa8 Avoid warnings when combining wxStaticText styles with C++20
Because wxStaticText can contain arbitrary combinations of both
alignment and border flags, we need to allow using "|" on them, just as
it was done for a few other enums in 3d278ee75f (Avoid warnings about
operations on different enums in C++20 mode, 2021-04-25).

See #22656.

Closes #22657.
2022-07-24 15:56:12 +01:00
Vadim Zeitlin
8e2c683bf7 Merge branch 'grid-message'
Improve wxGrid messages documentation and safety.

See #22652.
2022-07-24 15:52:15 +01:00
Thomas Klausner
770bcaf378 Handle NetBSD like other BSDs for ping in wxDialUpManager
NetBSD does not define __BSD__, use __NetBSD__.

See #22645.
2022-07-24 16:51:16 +02:00
Thomas Klausner
9efe21b55a Fix dlopen() detection in CMake under non-Linux systems.
Linux (until recently) defined dlopen() in libdl, but some other
operating systems (such as NetBSD) have it in libc.

Use CMake-provided variable for the name of the library to use for
dlopen() to fix NetBSD build.

See #22644.
2022-07-24 16:48:38 +02:00
Vadim Zeitlin
556868390f Merge branch 'statvfs'
Fix statvfs() detection in CMake under NetBSD and prefer statvfs() to
non-portable statfs() more generally.

See #22643.
2022-07-24 16:44:06 +02:00
Vadim Zeitlin
e62e7a6d62 Check for statvfs() first in configure
This POSIX function should be preferred to Linux/BSD-specific statfs()
if it's available (as should always be the case nowadays).

This commit is best viewed with Git --color-moved
--color-moved-ws=ignore-all-space -w options.
2022-07-24 16:43:04 +02:00
Vadim Zeitlin
3cdcee26c2 Merge branch 'tdmgcc-textctrl-fix'
Fix crash when using wxTextCtrl with TDM-GCC.

See #22641.
2022-07-24 15:29:00 +01:00
Vadim Zeitlin
1f5ccdfb65 Update expat submodule to fix rand_s() warning
No real changes, just avoid a warning about using an undeclared function
during the build.

Closes #22640.
2022-07-24 15:28:02 +01:00
Tim Stahlhut
c69ee439d9 Stop using wxWidgets 1.xx wxString compatibility functions
Replace them with std::string-like equivalents when possible (i.e.
replace Length() with length(), IsNull() with empty()) or, at least,
with wx 2 functions if not (e.g. Remove() with Truncate(), First() with
Find(), LowerCase() with MakeLower() etc).

Closes #22638.
2022-07-24 16:25:29 +02:00
Vadim Zeitlin
541be26e78 Mention that changes in 3.2.x should also be part of 3.3.0
It's a bit wasteful to also mention these changes in the Git notes, so
don't do it and just leave a reminder to copy the existing change log
entries from 3.2 branch instead when it's time to release 3.3.0.
2022-07-24 16:24:33 +02:00
Vadim Zeitlin
5b89e53bc3 Merge branch 'macos_webview_fullscreen_fix' of https://github.com/TcT2k/wxWidgets
Improve wxWebView full screen support under macOS.

See #22637.
2022-07-24 16:12:41 +02:00
Vadim Zeitlin
6fdfe98157 Merge branch 'filedialog-add-dir'
Add wxFileDialog::AddShortcut().

See #22543.

See #22635.
2022-07-24 15:11:13 +01:00
Tim Stahlhut
7626f53788 Use wxGetDisplayInfo() only when using wxGTK under Unix
Fix wxGTK build under MSW.

See #22633.
2022-07-24 16:06:05 +02:00
Vadim Zeitlin
7667bf30eb Merge branch 'version-3.3'
Update version of the libraries to 3.3 in master.
2022-07-24 16:05:21 +02:00
Maarten Bent
e4f230a3e1
CMake: Support spaces in install path with symlinks
Add quotes around the paths so they are treated as one argument.
2022-07-22 00:22:28 +02:00
Tobias Taschner
bfce3d2b87
macOS: wxWebView expand fullscreen element
Expand the fullscreen element via CSS styles to
enhance the emulation of native safari behaviour.
2022-07-21 15:25:58 +02:00
Tobias Taschner
99d978350b
macOS: wxWebView Remove fullscreen without prefix
The previous implementation included the fullscreen API with and without
the webkit prefix. Safari itself only provides the prefixed version.
This improves compatiblity at least with popular JS library video.js
and should also improve the situation in general as it closer to native
safari functionality (which is not available through WKWebView).
2022-07-21 15:24:25 +02:00
Thomas Klausner
d3563e4e55 cmake: prefer statvfs (to statfs)
Requested by VZ
2022-07-20 00:46:04 +02:00
Vadim Zeitlin
a85b5e2790 Add asserts checking wxGrid::Redimension() parameters validity
Try to detect the errors in them sooner, as things can break in rather
unexpected ways later, e.g. if we end up with a negative number of rows
or columns, as could happen if you simply exchanged the parameters of a
DELETED message by mistake.
2022-07-19 16:45:46 +01:00
Vadim Zeitlin
167dd07082 Remove redundant casts to int from wxGrid::Redimension() code
There is no need to cast already int variables to int before negating
them (this was probably a left over from 25 year old initial version
where these variables might have been unsigned).
2022-07-19 16:39:10 +01:00
Vadim Zeitlin
e102f61f8a Detect incorrect use of wxGRIDTABLE_NOTIFY_{ROWS,COLS}_APPENDED
Assert if the second parameter is used for this message as it may
indicate that the first parameter doesn't have the correct value neither
(e.g. it could be due to the confusion between INSERTED and APPENDED
parameters, that are interpreted differently).
2022-07-19 16:20:59 +01:00
Vadim Zeitlin
c15c0040db Correct documentation of wxGridTableMessage ctor parameters
Notably explain that the first parameter should contain the number of
rows/columns when appending, not the position.
2022-07-19 16:18:47 +01:00
Thomas Klausner
684c149f49 Try improving consistency in statfs/statvfs usage. 2022-07-19 12:07:22 +02:00
Thomas Klausner
1b11553056 cmake: Fix statvfs support 2022-07-19 11:37:00 +02:00
Vadim Zeitlin
39a226c600 Document customizing shortcuts section title in wxMSW
It's quite non obvious that the "FileDescription" field of the version
information defined in the resource file is used for this, so explain
it.

Co-Authored-By: Mark Roszko <mark.roszko@gmail.com>
2022-07-18 23:57:49 +01:00
Vadim Zeitlin
7a16275b57 Fix text sample build with wxUSE_LOG==0
Add missing preprocessor checks around the use of m_log.
2022-07-18 20:49:16 +01:00
Vadim Zeitlin
70c5ec6eff Move wxTextCtrl constructors out of line in wxMSW
When inheriting from std::streambuf, as is the case by default, and
creating wxTextCtrl in the application (as is common) and destroying it
in the library (as is even more so, as it's typically done when the
parent window is destroyed), having inline constructor but not inline
destructor apparently results in std::locale, which is part of
std::streambuf, to be allocated and destroyed using different heaps or
something similar when using TDM-GCC libstdc++, as destroying
std::locale inside the library corrupts the heap and results in crashes
when the next std::locale object is destroyed -- i.e. creating, and then
destroying, more than one wxTextCtrl results in a crash.

Work around this by moving the constructors out of line, as this is
sufficient to avoid the problem, even if it's exact causes are not
exactly clear.

This commit is best viewed with Git --color-moved option.

See #22639.
2022-07-18 20:44:02 +01:00
Vadim Zeitlin
854599c0bd Add wxFileDialog::AddShortcut() documentation
Also add a comment to the sample explaining the default behaviour.
2022-07-17 22:24:56 +01:00
Vadim Zeitlin
dedd0384e6 Implement wxFileDialog::AddShortcut() for wxGTK too
Flags are not supported as GTK doesn't allow defining the order of the
shortcuts, at least not without removing all the existing ones, which
looks like an overkill.
2022-07-17 22:24:56 +01:00
Vadim Zeitlin
5d3ebf9457 Add wxFileDialog::AddShortcut()
This allows to add application-specific directories to the file dialog.

This commit only contains the implementation for wxMSW and a change
showing the new function in the sample.
2022-07-17 22:24:56 +01:00
Vadim Zeitlin
172ebc6dbc Fix using slashes in wxFileDialog paths
Convert slashes to backslashes when using SHCreateItemFromParsingName()
as it doesn't support the former and returns E_INVALIDARG for the
strings containing them.

This fixes a regression in wxFileDialog::SetDirectory() since the switch
to using IFileDialog in wxMSW, as it didn't set the initial directory
correctly if it contained slashes, unlike before (because we already
replaced slashes with backslashes manually when using common file
dialogs).
2022-07-17 19:21:18 +01:00
Vadim Zeitlin
eb0ee6d82f Do log SHCreateItemFromParsingName() errors
Even if we mostly ignore them when they happen, it can still be useful
to see them in the debug logs.
2022-07-17 19:20:29 +01:00
Vadim Zeitlin
f1c114ebc6 Factor out IShellItem creation code in a reusable function
Add InitShellItemFromPath() which is going to be reused in the upcoming
commit.

No real changes, this is a pure refactoring.
2022-07-17 18:34:58 +01:00
Vadim Zeitlin
af4ad43824 Rebake and rerun autoconf after the version update 2022-07-17 17:03:39 +02:00
Vadim Zeitlin
cb47205ae1 Update ABI checking instructions to use libabigail tools
The previously used abi-compliance-checker doesn't seem to work any
more, so switch to an alternative ABI diff tool.
2022-07-17 16:58:11 +02:00
Vadim Zeitlin
67c261b944 Update library version to 3.3
Manually change the minor version value everywhere.

Reset the contents of the README in preparation for the future 3.3.0
release.
2022-07-16 17:02:56 +02:00
Václav Slavík
e9d299d92c Fix wxBitmapBundle compatibility for template NSImages
Fix backward compatibility regression where native NSImage bitmaps, such
as those loaded via wxArtProvider on macOS, would loose their isTemplate
property when implicitly converted to wxBitmap and back. This resulted
in broken rendering of templates.

This is a common situation in pre-wxBitmapBundle code. wxArtProvider
returns wxBitmapBundle, which is then implicitly converted to a single
wxBitmap in wxArtProvider::GetBitmap() and when its later passed to a
function that takes wxBitmapBundle, it is converted back using the
wxBitmapBundleImplSet implementation.

wxBitmapBundleImplSet serves dual role: it is used both for manually
assembling bitmap bundles and to implicitly faciliate the backward
compatiblity mechanism described above. To make the latter truly
transparent, we need to special-case it and preserve NSImage as is, and
this commit does exactly that.

See #22623.
2022-07-15 01:03:17 +02:00
Vadim Zeitlin
f8fb90c1bd Include required wx/scopedptr.h directly in wxGTK menu code
Don't rely on it being included indirectly from wx/translation.h, which
doesn't happen when wxUSE_INTL==0.

Closes #22626.
2022-07-15 01:00:25 +02:00
Vadim Zeitlin
134862a464 Document that wxWindow::SetClientSize() doesn't support -1
Unlike SetSize(), passing -1 to this function doesn't preserve the
existing size in the corresponding direction.
2022-07-15 00:57:53 +02:00
Václav Slavík
3e883fecdf Remove leftover wxABI_VERSION checks
Remove forgotten wxABI_VERSION checks from version 3.0.1.
2022-07-13 13:40:11 +02:00
Vadim Zeitlin
623a68c8fa Explicitly use .exe extension when launching tests under Wine
Wine 7.0 and later doesn't find the command if the extension is omitted
any longer, unlike the previous versions.
2022-07-13 01:01:54 +02:00