Commit Graph

71396 Commits

Author SHA1 Message Date
Kvaz1r
b8d9ac9a32 Revert MSW-specific changes for wxTextCtrl tests in wxUniv 2021-08-07 11:03:03 +03:00
Kvaz1r
e3acc50fbc Improve wxTE_PROCESS_ENTER handling in wxUniv 2021-08-07 10:42:22 +03:00
Kvaz1r
5d1a936f73 Revert "Handle WM_GETDLGCODE in wxTextCtrl for wxUniv too"
This reverts commit af8b662868.
2021-08-07 09:40:26 +03:00
Vadim Zeitlin
ebec1ff9f6 Rebake after removing shaped-ld-sh from bakefile
Simply remove the not existent any longer shared-ld-sh from clean
targets in all makefile.

This should have been done in e663d9af2b (Stop using shared-ld wrapper
script under Mac, 2021-07-06).
2021-08-06 21:51:40 +02:00
Arrigo Marchiori
30915c6163 Make wxrc independent from GUI support
The wxrc program does not depend on the GUI libraries, but only on
the base and XML libraries, so make it possible to build it in non-GUI
builds too.

Closes https://github.com/wxWidgets/wxWidgets/pull/2419
2021-08-06 21:51:11 +02:00
frederick-vs-ja
aaa2dabf5d Remove usage of __w64 for recent MSVC versions
__w64 just increases warnings and errors since VS 2013 (according to
https://docs.microsoft.com/en-us/cpp/cpp/w64?view=msvc-160), so don't
use it any longer.

Closes https://github.com/wxWidgets/wxWidgets/pull/2455
2021-08-06 20:30:43 +01:00
Vadim Zeitlin
b9261597bf Merge branch 'msw-combo-keys'
Fix behaviour of comboboxes in presence of accelerators in wxMSW.

See https://github.com/wxWidgets/wxWidgets/pull/2443
2021-08-06 20:29:20 +01:00
Vadim Zeitlin
1e37f6e5ff Provide information in wxListEvent for generic virtual wxListCtrl
This wasn't done since the changes of c1c4c5516c (fixed unwanted owner
data accesses in virtual list ctrl, 2001-08-07), but there doesn't seem
to be any reason to avoid accessing the item in SendNotify() (any more?)
and if we ever did generate events for all the items in a virtual list
control, this would be already a problem, even if we didn't access the
line info from here.

So just revert the check for !IsVirtual() and always fill the item in
the generated event to make the behaviour of the generic version
consistent with the MSW one and slightly more useful.

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

Closes #19235.
2021-08-06 21:28:24 +02:00
Vadim Zeitlin
c7ed88af7c Move comment in wxOSX wxToolBar code to a more logical place
No real changes, just move the comment in front of the line it
documents.
2021-08-06 21:22:08 +02:00
Vadim Zeitlin
ce48d01e8a Fix missing item labels in wxToolBar overflow menu under macOS
Always set the label, even when not using wxTB_TEXT style, as otherwise
the items shown in the native "overflow" menu use empty strings as
labels and so can't be distinguished at all.

This undoes part of the changes of 1f7cd4807f (Don't show labels for
toolbars showing icons only in wxOSX, 2016-02-23), but they don't seem
necessary any longer, i.e. calling SetToolShortHelp() doesn't show the
toolbar label when using non-native toolbars, so #16669 remains fixed.

Closes #19226.
2021-08-06 21:17:51 +02:00
Vadim Zeitlin
d8fe06891e Avoid bool argument in wxListMainWindow::RecalculatePositions()
Use 2 separate functions instead to make the code more clear, as passing
false for indicate the refresh shouldn't be done was quite confusing.

Also get rid of a separate RefreshAll() which was called only from
RecalculatePositions().

No real changes.
2021-08-06 21:09:29 +02:00
Vadim Zeitlin
36e9576d42 Fix not refreshing wxListCtrl properly under macOS
Refresh() called from inside wxEVT_PAINT handler doesn't seem to have
any effect, so use CallAfter() to call it slightly later instead.

Closes #19139.
2021-08-06 21:05:49 +02:00
David Connet
233c487dfd Fix direction of mouse wheel zoom in print preview
Make zooming work the same as in all the other programs rather than
zooming in/out in the reverse direction.

Closes #19215.
2021-08-06 19:34:19 +02:00
Vadim Zeitlin
de2b81b06f Ignore error in another wxWebRequest test under AppVeyor
This is similar to b03eaceea6 (Disable WebRequest::SSL::Ignore unit test
under AppVeyor, 2021-08-04) and just warns about the wxWebRequest
cancelling test failure when running it under AppVeyor instead of
failing the entire test suite, as this does happen sporadically (but
regularly) there for as yet unknown reason.
2021-08-05 23:42:53 +01:00
Vadim Zeitlin
56eeb694e7 Fix tests compilation with glibc >= 2.34
Update CATCH submodule to include the workaround for SIGSTKSZ not being
a constant any longer in the latest GNU libc versions.

Closes #19158.
2021-08-05 23:03:20 +02:00
Vadim Zeitlin
dc9dc39970 Fix typos and formatting in wxRegEx incompatibilities section
Double the backslashes to prevent Doxygen from interpreting them as
commands and remove a redundant word.
2021-08-04 21:19:14 +01:00
Vadim Zeitlin
09cbec0373 Allow calling wxListCtrl::SetImageList() before Create() in wxMSW
This already worked with the generic version, but silently failed with
wxMSW, so make it work with wxMSW too as it doesn't cost much and makes
wxListCtrl behave in the same way under all platforms.

Also document that SetImageList() can be used before the window is
created.
2021-08-04 21:09:04 +01:00
Vadim Zeitlin
b03eaceea6 Disable WebRequest::SSL::Ignore unit test under AppVeyor
This test sporadically fails in builds with different compilers (both
MSVC and gcc) there for unknown reasons. Until we can find, and fix, the
underlying problem, disable this test to avoid spurious CI failures.
2021-08-04 18:24:28 +02:00
Vadim Zeitlin
ef21046c2c Document more incompatibilities between PCRE and old wxRegEx
Also try to make the reference to this documentation in the change log
more clear.
2021-08-04 01:36:46 +02:00
Vadim Zeitlin
232a3ab577 Allocate more space for the wxRegEx error message buffer
We need to account for the trailing NUL explicitly here, so add 1 to the
length returned by the first call to wx_regerror() to avoid chopping off
the last character of the error message.
2021-08-04 01:29:44 +02:00
Vadim Zeitlin
bdee83d5ff Fix checks for submodules when using configure --srcdir option
In this case ac_confdir variable is not set, but srcdir still is, so
just use the standard (and also more clear) variable instead.

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

Closes #19236.
2021-08-02 19:23:40 +02:00
Vadim Zeitlin
a4a65f16f6 Fix linking with builtin regex library
Use the value of wxUSE_REGEX in configure, not its name.
2021-08-02 18:10:20 +02:00
Kvaz1r
af8b662868 Handle WM_GETDLGCODE in wxTextCtrl for wxUniv too 2021-08-02 10:05:37 +03:00
Kvaz1r
f7f6575bfb Fix positions tests 2021-08-01 11:33:03 +03:00
Kvaz1r
335d0bec0c Skip or disable unsupported tests 2021-08-01 11:22:12 +03:00
Vadim Zeitlin
a4d06b6c88 Explicitly include wx/scopedptr.h when using wxScopedPtr
Don't rely on it being implicitly included from other headers.
2021-08-01 00:43:31 +01:00
Vadim Zeitlin
55d57c0f68 Remove another obsolete Borland hdrstop pragma
See f57f214122 (Remove BCC-specific hdrstop pragma from everywhere,
2020-10-12).
2021-08-01 00:43:31 +01:00
Vadim Zeitlin
6e40b2525e Stop updating non-existent MSVC 7 project files
MSVC 7 project files don't exist any longer, so don't try updating them
in upmake.

This should have been done in 8b854d2f92 (Remove MSVC 7 project files
and support for generating them, 2021-04-26).
2021-07-31 19:12:41 +01:00
Vadim Zeitlin
c533dab96a Merge branch 'drop-pid_t-checks'
Stop defining pid_t in wx setup.h to avoid conflicts with the other
libraries (such as Boost.Process) also defining it under MSW and also
just because this was completely unnecessary.

See https://github.com/wxWidgets/wxWidgets/pull/2452
2021-07-30 00:55:00 +02:00
Dimitri Schoolwerth
a4cdbdb779 Fix disappearing wxDVC cell items if cell background is set
With both GTK 2 and 3 if a wxDVC cell has a background colour attribute
set then wxDataViewCustomRenderer::RenderText() sets the cell's
background property. With wxDataViewCheckIconText this results in items
drawn prior to the text to be painted over.

Reproducible using the dataview sample which on the MyListModel page
uses a background cell colour for the first column of odd-indexed rows.

Fix by drawing the text first, followed by the checkbox and possible
icon as before. There appear to be no other custom renderers in wx which
draw multiple items and may have needed fixing as well.

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

Closes https://github.com/wxWidgets/wxWidgets/pull/2449
2021-07-30 00:50:55 +02:00
Vadim Zeitlin
32d9b0413d Don't bother checking for size_t, mode_t and off_t neither
The latter two are always defined in sys/types.h on all Unix systems and
we already define them for MSVC (which doesn't use configure anyhow).

The former type is always defined everywhere.
2021-07-28 21:09:32 +02:00
Vadim Zeitlin
e8975eec72 Stop testing for gid_t and uid_t that we never use in CMake
Also remove the corresponding parts of setup.h.in.
2021-07-28 21:01:17 +02:00
Vadim Zeitlin
244389699e Drop checks for pid_t from autoconf and CMake
This type should always be defined in sys/types.h on any non-ancient
Unix system, so don't bother checking for it, which is not only wasteful
but can even be harmful because it can conflict with pid_t definitions
in the other libraries under Windows, where we (wrongly) define it as
int (which is actually a bug in autoconf, which was recently fixed, see
https://savannah.gnu.org/support/index.php?110296) when using CMake.

So just don't define it at all: it should be already defined under Unix
and we don't use it under MSW anyhow.

See https://github.com/microsoft/vcpkg/issues/19110

See #18150.
2021-07-28 21:01:17 +02:00
Vadim Zeitlin
e947508da4 Use master for AppVeyor badge status instead of latest build
Otherwise the badge in README could show "failing" just because some PR
build was failing, even if master build passed.
2021-07-28 01:30:19 +02:00
Vadim Zeitlin
b7c2918bf1 Document that Refresh() always erases background in non-MSW ports
The distinction between redrawing the background and the rest of the
window only exists in MSW and we can't refresh the window without
refreshing its background in the other ports, but we can at least
document this.

Closes #19234.
2021-07-28 01:25:51 +02:00
Lauri Nurmi
f4eae4df2a Really determine availability of all stdtoxx_l() functions
The case of missing strtod_l() is already handled by 9507bc430e
(Determine availability of the required xlocale API by compiling,
2017-04-14).

Similarly test for all the strto*_l() functions used by wx instead of
assuming that they are available if strtod_l() is.

It appears that the 'musl' C standard library, used on e.g. Alpine
Linux, does have strtod_l(), but not the others. Because of which this
check did not properly disable the feature, and compilation would fail.

Closes https://github.com/wxWidgets/wxWidgets/pull/2451
2021-07-27 17:47:32 +02:00
Lauri Nurmi
b029902f6c Fix compilation with gcc 4.4 under CentOS 6
Fix

	'friend' keyword needs 'class'

error introduced by 035c29e6a2 (Make wxRescaleCoord() safer by requiring
explicitly using From/To, 2021-07-13) which broke the build with gcc
4.4.7 used under CentOS 6.

Closes https://github.com/wxWidgets/wxWidgets/pull/2450
2021-07-27 17:47:31 +02:00
Vadim Zeitlin
62c776c17c Merge branch 'regex-pcre'
Implement wxRegEx using PCRE2.

See https://github.com/wxWidgets/wxWidgets/pull/2438
2021-07-27 17:47:31 +02:00
Artur Wieczorek
ea04c72754 Revert "Store clipping box coordinates in device units in wxWindowDCImpl, wxGTKDCImpl"
This reverts commit 95f1b262a4 ("Store clipping box coordinates in
device units in wxWindowDCImpl, wxGTKDCImpl", 2021-07-26) because
device coordinates can be used to determine final clipping box
coordinates more accurately only if current logical coordinates
are not stored directly in the corresponding variables of the base
class wxDCImpl.
2021-07-27 17:25:30 +02:00
Artur Wieczorek
eb055dba71 Store clipping box in device units only if it's set with wxDCImpl::DoSetClippingRegion
If derived class sets clipping region in a legitimate way by call to
DoSetClippingRegion() instead of directly storing logical coordinates
of the box in the internal variables we can store coordinates in
device units to determine final logical coordinates more reliably even
in case when coordinate transformations were applied to DC
in the meantime.
2021-07-27 17:14:50 +02:00
Kvaz1r
5bc725f505 Set insertion point to 0 in SetValue for multiline 2021-07-27 10:50:24 +03:00
Artur Wieczorek
95f1b262a4 Store clipping box coordinates in device units in wxWindowDCImpl, wxGTKDCImpl
Because retrieving clipping box coordinates in DoGetClippingRect() is
delegated to wxDCImpl::DoGetClippingRect() we need to store coordinates
in device units because such units are used internally in wxDCImpl
(2bcc9382a7 ("Store clipping box coordinates in device units for generic
wxDC", 2021-07-26).
Stored device units are converted to the current logical units
in wxDCImpl::DoGetClippingRect().
2021-07-26 23:43:17 +02:00
Artur Wieczorek
2bcc9382a7 Store clipping box coordinates in device units for generic wxDC
Clipping box coordinates should be stored internally in device units
to be independent on changes of logical coordinates made between calls
to wxDCImpl::DoSetClippingRegion().
These stored coordinates should be converted on demand to the current
logical units on call to wxDCImpl::DoGetClippingRect().
2021-07-26 21:04:21 +02:00
Artur Wieczorek
30a4090ac9 Fix determining DC area for wxDC with applied affine transformation
We need to take into account all aplied transformations (including affine
transformation set with SetTransformMatrix()) while calculating entire
DC area in logical coordinaates.
For derived wxDC's that support affine transformations
DeviceToLogical[Rel]() functions are overriden with
platform-specific implementations taking into account all applied
transformations (see documentation of wxDC::DeviceToLogical(),
wxDC::DeviceToLogicalRel()) and they may be not equivalent to
DeviceToLogical[Rel]{X|Y}().
2021-07-26 20:39:40 +02:00
Artur Wieczorek
74833ac435 Fix SetDeviceClippingRegion for wxSVGFileDC
Device-based coordinates should be converted to logical coordinates
before they are passed to SetClippingRegion().
2021-07-26 20:33:40 +02:00
Artur Wieczorek
b1206a6d50 Fix inserting new SVG <g> element
New <g> container element should be created every time
the actual transformation is changed and that's why
the flag should be set in ComputeScaleAndOrigin().
2021-07-26 20:30:57 +02:00
Artur Wieczorek
4193077888 Normalize clipping box in wxSVGFileDC::DoSetClippingRegion
Clipping box parameters should be in the canonical form
with (x,y) pointing to the top-left corner of the box and with
width/height >= 0 because SVG doesn't accept negative values
of width/height and because this form in expected in wxDCImpl.
2021-07-26 20:08:49 +02:00
Artur Wieczorek
4e16f01de9 Run all clipping region tests against wxSVGFileDC 2021-07-26 18:51:25 +02:00
Vadim Zeitlin
cf91a8d9a2 Merge branch 'border-size-functions'
Replace DoGetBorderSize() with GetWindowBorderSize() to avoid having 2
different functions doing (almost) the same thing.

See https://github.com/wxWidgets/wxWidgets/pull/2445
2021-07-26 13:59:41 +02:00
PB
3a0bb1b18c Fix setting focus to wxWebViewEdge
It was impossible to give focus to the actual web view in wxWebViewEdge
by keyboard navigation or programmatically with wxWebViewEdge::SetFocus().

Fix it by calling CoreWebView2Controller::MoveFocus() in the wxWebViewEdge's
wxEVT_SET_FOCUS handler.

Closes https://github.com/wxWidgets/wxWidgets/pull/2444
2021-07-26 13:57:10 +02:00