Commit Graph

69350 Commits

Author SHA1 Message Date
Vadim Zeitlin
b6cff426ce Merge branch 'remove-bcc-support'
Remove support for Borland C++ compiler, it wasn't tested since a long
time and probably didn't work anyhow and there was no interest in
keeping support for it since many years.

See https://github.com/wxWidgets/wxWidgets/pull/2087
2020-10-16 01:58:13 +02:00
Vadim Zeitlin
1fb8d3621f Send wxEVT_DESTROY to children of wxAuiManager-associated window
This fixes a regression introduced in f646532889 (Call
wxAuiManager::UnInit() if associated frame is destroyed, 2020-07-18)
since when children of a window managed by wxAuiManager didn't receive
wxEVT_DESTROY any more because the manager intercepted it for its own
needs.

Closes #18938.
2020-10-15 23:53:12 +02:00
Vadim Zeitlin
a1381347c9 Fix harmless signed/unsigned warning in wxTextInputStream
Just fix a warning about assigning -1 to a size_t variable introduced in
the recent commit 1e435d2347 (Fix wxTextInputStream incorrectly decoding
multibyte fallback encodings, 2020-09-28).

No real changes.
2020-10-15 23:42:42 +02:00
PB
68a4e47e4c Remove trailing whitespace 2020-10-15 19:50:37 +02:00
Gideon van Melle
8f1523e610 Update Dutch translations 2020-10-15 17:07:45 +02:00
PB
29370cfee9 Get rid of wxCOMPILER_NO_OVERLOAD_ON_ENUM compile guard 2020-10-15 16:41:43 +02:00
Paul Cornett
d104271364 Build fix for pre-C++11 compilers
Broken by b5a554b9a6 (Avoid -Wdouble-promotion warnings, 2020-10-14)
2020-10-14 14:41:34 -07:00
Paul Cornett
896d383a4d Move some early-out code to the top of the function 2020-10-14 12:09:34 -07:00
Paul Cornett
1e474323f6 Avoid unused function warning when wxUSE_LOG_TRACE==0 2020-10-14 12:05:14 -07:00
Paul Cornett
72c002f8c5 Avoid -Wsign-compare warning 2020-10-14 12:03:51 -07:00
Paul Cornett
c7122a8c0d Add a wxRound() overload for float 2020-10-14 12:03:02 -07:00
Paul Cornett
0825b59553 lround() is available in Visual Studio 12 2020-10-14 11:44:22 -07:00
Paul Cornett
55992cc9e1 Use lround() for non-C++11 wxRound(), as with C++11 version 2020-10-14 11:42:45 -07:00
PB
caab5dda00 Resolve removal of the rest of BCC-affected
Make changes based on feedback provided by vadz.
2020-10-14 20:11:58 +02:00
PB
6ba1b8c78c Fix the bug causing GUI tests crashes 2020-10-14 20:10:30 +02:00
Paul Cornett
b5a554b9a6 Avoid -Wdouble-promotion warnings 2020-10-14 11:07:55 -07:00
PB
fd67feedbc Revert change to src/common/event.cpp
This change seems to be the most likely cause for
the bug crashing the GUI tests.
2020-10-14 16:05:14 +02:00
Paul Cornett
97655e5b21 Don't invalidate wxStaticBitmap best size unless bitmap size changes
This is what wxMSW does. See #18943
2020-10-13 10:25:19 -07:00
PB
be7e68605e Remove BCC make and project files 2020-10-13 18:54:01 +02:00
PB
f0ee18f1aa Remove BCC mentions from documentation 2020-10-13 18:49:53 +02:00
PB
a6d4799de9 Remove BCC-specific conditionally compiled code 2020-10-13 18:40:31 +02:00
Paul Cornett
3bad6ecf0b Make sure window is shown before trying to show it full screen, see #18942 2020-10-13 09:24:08 -07:00
Vadim Zeitlin
8a67a78195 Merge branch 'mac-dvc-setselections-performance' of https://github.com/vslavik/wxWidgets
Speed up wxDataViewCtrl::SetSelections() on macOS.

See https://github.com/wxWidgets/wxWidgets/pull/2084
2020-10-13 01:59:57 +02:00
PB
f57f214122 Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
Scott Talbert
ab65087e93 Document that wxGraphicsContext::DrawText angles are in radians
This resolves confusion reported by a wxPython user:
https://github.com/wxWidgets/Phoenix/issues/1815
2020-10-12 13:50:27 -04:00
Paul Cornett
5e8b39f02a Fix WriteText() not scrolling to bottom with GTK >= 3.14, part 2
Detecting that the scrollbar position was at the bottom did not work while a
scrollbar animation was in progress. Work around this by updating the position
whenever the scrollbar parameters are changed during the incremental layout.
Setting the position directly will prevent any scrollbar animation from starting.
See #18864
2020-10-12 10:01:54 -07:00
Vadim Zeitlin
1f40a7e4e3 Document that wxDataViewCtrl::SetSelections() skips invalid items
Also add the unit test checking for this.
2020-10-12 18:32:11 +02:00
Václav Slavík
9457c35d42 Speed up wxDataViewCtrl::SetSelections() on macOS
Don't make many single-item selection adjustments in SetSelections() in
wxOSX and instead implement it with a single native call to
selectRowIndexes:byExtendingSelection:

This has a dramatic, orders of magnitude effect on this call's
performance when selecting many items: selecting 10 thousand items goes
from minutes of runtime and gigabytes of RAM  to unobservable impact in
both.
2020-10-12 18:32:11 +02:00
Vadim Zeitlin
ae8820b2f6 Fix build error with clang in the widgets sample
Don't use overloaded function as event handler.
2020-10-10 22:22:48 +02:00
PB
fafc5613f4 Fix slider event counter in widgets sample
Commit 952e5f3 introduced logging wxEVT_SLIDER events in addition to
scrolling events but the event count was incorrect as the wxEVT_SLIDER
handler and scrolling events handler kept their own event count.

Fix this by using a static member variable shared by both event handlers.
2020-10-10 19:38:34 +02:00
ali kettab
fedc80eee3 Improve selection and focus events generation in wxGenericLisCtrl
Avoid sending spurious wxEVT_LIST_ITEM_{FOCUSED, SELECTED, DESELECTED}
events and make the generic version consistent with the behaviour of the
native wxMSW one.

Also add/extend the tests and slightly improve the sample.

Closes https://github.com/wxWidgets/wxWidgets/pull/2044
2020-10-10 19:13:52 +02:00
Artur Sochirca
80a3cd2db9 Avoid using non-ASCII key codes in key up/down events in wxOSX
Generating such events could result in mishandling some key presses as
special keys, e.g. the Turkish "ş" characters was mistakenly processed
as F12 because F12 corresponds to its Unicode character code (U+015F).

Avoid this by only setting wxKeyEvent::m_keyCode for printable
characters (while still making the actual key available in m_uniChar).

This makes wxOSX consistent with wxGTK and documented behaviour.

Closes https://github.com/wxWidgets/wxWidgets/pull/2081
2020-10-10 18:32:36 +02:00
PB
952e5f32cd Fix generation of extraneous wxEVT_SLIDER events in wxMSW
Don't send the event when it's redundant, i.e. doesn't really notify
about the change in the slider value.

Also add a test case for wxEVT_SLIDER and show these events in the
widgets sample.

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

Closes #18929.
2020-10-10 18:21:27 +02:00
Vadim Zeitlin
7ed330a197 Merge branch 'image-paste-fix'
Fix recent regression resulting in a crash in wxImage::Paste().

See https://github.com/wxWidgets/wxWidgets/pull/2076
2020-10-10 18:12:35 +02:00
Vadim Zeitlin
87fc7a9dc0 Merge branch 'webkit-extension-fixes' of https://github.com/vslavik/wxWidgets
Improve WebKit2 extension loading: make the code cleaner and safer.

See https://github.com/wxWidgets/wxWidgets/pull/2075
2020-10-10 18:11:45 +02:00
Vadim Zeitlin
e21f8ba1a3 Merge branch 'convauto_getencoding' of https://github.com/pavel-t/wxWidgets
Add wxConvAuto::GetEncoding(), other improvements and bug fixes.

See https://github.com/wxWidgets/wxWidgets/pull/2072
2020-10-10 18:09:29 +02:00
Václav Slavík
8756ff4320 Don't load webkit extensions from CWD-relative paths
wxgtk_initialize_web_extensions() tries to find extensions in the
location where "make install" puts them. If that fails, either because
wx wasn't installed yet, or it was deployed (e.g. in static build)
without them, it looks into additional places - paths relative to CWD.
This is to faciliate running wx samples and tests, but by being enabled
in release builds too, it allowed loading unexpected executable code
from untrusted locations. For example, on typical desktops, one could
put malicious .so files into $HOME/lib to have them loaded by
wxWebView-using applications.

Address this by making the helper paths relative to the executable's
location, not working directory.
2020-10-08 19:41:30 +02:00
Václav Slavík
b355e00149 Only warn about missing WebKit extension when used
Don't log failure to load the extension during initialization, because
it isn't needed for many uses of wxWebView. Instead, only report the
failure at the time when functionality depending on it is used.

Also use g_warning() for logging consistently with other failures in
this file. This doesn't interrupt the user, yet shows the problem highly
visibly in the console.
2020-10-08 19:32:49 +02:00
Václav Slavík
2388f5d33f Don't crash if WXPREFIX env. variable is set
Change wxGetInstallPrefix() to return a string instead of const
wxChar*. The latter was incorrectly obtained from a temporary string if
WXPREFIX was set. While it's possible to fix in a backward compatible
manner without changing the function's signature, it's not worth the
effort for something pretty obscure and used mostly internally.
2020-10-08 18:50:56 +02:00
Artur Wieczorek
365c3a2ae9 Revert "Get rid of unused wxTransformMatrix"
wxTransformMatrix is undocumented but it is appartently
in use so it has to be present in the library.

This reverts commit 3e88df56f5.
2020-10-07 23:15:10 +02:00
Pavel Tyunin
0ab3b4eac7 Fix UTF-8 build 2020-10-07 17:53:43 +03:00
Pavel Tyunin
c9dd9e96a1 Allow decoding even shorter strings in fallback encoding
Complete UTF-8 characters (except leading nulls) never appear in failed decoding attempts when the input is fed byte by byte.
2020-10-07 17:31:42 +03:00
Pavel Tyunin
1cbcf24832 Make leading nulls a special case to avoid breaking decoding some short strings in fallback encoding 2020-10-07 17:02:06 +03:00
Pavel Tyunin
b536457e07 Use tableUtf8Lengths[] in sringops.cpp too 2020-10-07 15:41:15 +03:00
Pavel Tyunin
240fcee90e Move wxIsUTF8Prefix() to convauto.cpp 2020-10-07 15:18:30 +03:00
Pavel Tyunin
13700025be Add wx/private/unicode.h 2020-10-07 15:18:17 +03:00
Artur Wieczorek
3e88df56f5 Get rid of unused wxTransformMatrix
As it is stated in matrix.cpp wxTransformMatrix was intended to be used
in wxDC to replace the basic system of scaling/translation but actually
it was never used.
Because applying affine transformations can be done with wxAffineMatrix2D
and wxDC::SetTransformMatrix() we can get rid of this dead code.

Closes #13114.
2020-10-06 20:49:32 +02:00
Vadim Zeitlin
96eb09a383 Really ignore TABs in makefiles etc in the whitespace check
Add missing ":" in the beginning of Git pathspecs to make the exclusions
really work.

Also add entries for Makefile.in, which is not caught by **/*akefile*,
and other files in the root directory containing hard TABs.
2020-10-06 02:14:46 +02:00
Vadim Zeitlin
1668b0bb4e Replace hard TABs in wx-config with spaces
No real changes, just de-TAB-ify.
2020-10-06 02:14:27 +02:00
Hartwig
728f2f958f Fix crash in wxImage::Paste() when using images without alpha
Check for the presence of alpha channel before using it in the fallback
code.

Also add a unit test exercising this branch of the code and which
crashed before.
2020-10-06 00:48:48 +02:00