Commit Graph

69598 Commits

Author SHA1 Message Date
Vadim Zeitlin
88332e06c8 Update expat to the latest 2.2.10 release 2020-12-30 23:33:55 +01:00
Vadim Zeitlin
28348b578a Update libpng to fix compatibility with older macOS versions
See https://github.com/wxWidgets/libpng/pull/5
2020-12-30 23:33:03 +01:00
Vadim Zeitlin
c069a62bd6 Merge branch 'github-ci-asan' of https://github.com/thesiv/wxWidgets
Switch to GitHub Actions for the ASAN CI build: running it on Travis CI
often fails (see https://github.com/google/sanitizers/issues/1353),
making it more trouble than it's worth, so try running it on GitHub
instead.

If it works fine there, we can move more Travis CI builds to that
platform later.

See https://github.com/google/sanitizers/issues/1353
2020-12-30 15:23:18 +01:00
Jorge Moraleda
ca9fa09fd8 Fix drawing expander column without values in generic wxDVC
When an item is marked as not containing any value in the expander
column, we must still draw the expander button if it has children, so
skip only drawing the item value in this case (and also preparing it for
drawing it, as calling PrepareForItem() would trigger an assert failure
for the items without value), but still execute the rest of the drawing
code for it, including drawing the background and expander button.

Closes https://github.com/wxWidgets/wxWidgets/pull/2144
2020-12-30 14:47:01 +01:00
Ilya Sinitsyn
67d286d499 Remove build with ASAN from Travis builds 2020-12-30 13:50:59 +07:00
Ilya Sinitsyn
ea6af85859 Add GitHub CI Workflow action for ASAN build
Unfortunately Travis build with ASAN fails with the segmentation violation
so build wx with GitHub CI.
2020-12-30 13:37:17 +07:00
Robin Dunn
bf6fee0af9 Avoid array overrun in OSX's wxCheckListBox::IsChecked 2020-12-29 18:07:20 -08:00
Xaviou
be5b68459d Add scripts used for building MinGW official binaries
Add the scripts themselves and the documentation explaining how to use
them and which compilers are currently supported.

Closes https://github.com/wxWidgets/wxWidgets/pull/2129
2020-12-29 17:41:01 +01:00
Vadim Zeitlin
f742bbaddf Merge branch '15943-grid-autosize-loop' of https://github.com/discnl/wxWidgets
Fix infinite loop with auto-wrapped multi-line cells in wxGrid.

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

Closes #15943.
2020-12-29 17:28:17 +01:00
Jorge Moraleda
ce4d95eac0 Fix not resorting generic wxDVC when model sort order changes
We can't skip resorting wxDataViewCtrl contents when the sort order is
defined by the model class, as it can change at any moment, so restrict
this optimization to the cases when we're sorting by the value of some
column.

Closes https://github.com/wxWidgets/wxWidgets/pull/2153
2020-12-29 17:23:18 +01:00
Vadim Zeitlin
87d94819a1 Merge branch 'add-ribbonBar-coord-functions' of https://github.com/STgithub64/wxWidgets
Add wxRibbonToolBar GetToolByPos() and GetToolRect().

See https://github.com/wxWidgets/wxWidgets/pull/2152
2020-12-29 17:13:58 +01:00
VZ
9160181bcc Minor simplifications and code style fixes
No real changes.
2020-12-29 17:00:08 +01:00
Jorge Moraleda
9640f0027f Fix assert when computing best column width in generic wxDVC
Do not invoke a renderer's PrepareForItem when estimating best column
width in generic wxDVC for items with no value because PrepareForItem
fails for items with no value when the null variant cannot be converted
to the expected type.

Closes https://github.com/wxWidgets/wxWidgets/pull/2149
2020-12-29 16:47:54 +01:00
Vadim Zeitlin
f5bc0a9b31 Merge branch 'webview_edge_improvements2' of https://github.com/TcT2k/wxWidgets
Disable status bar in Edge-based webview for consistency with the other
backends.

See https://github.com/wxWidgets/wxWidgets/pull/2147
2020-12-29 16:23:32 +01:00
Christian
8255a71dc7 Fix error when clicking on empty space in wxDVC under Mac
Double clicking on empty space under the items in wxDataViewCtrl still
results in actionDoubleClick: being called, even though there is no
valid item under the mouse.

Just ignore such notifications, as we're not supposed to generate any
events in this case (neither GTK nor generic version do it) and calling
itemAtRow: with invalid row results in errors due to invalid index use.

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

Closes #18984.
2020-12-29 15:52:56 +01:00
Artur Wieczorek
34fd2bc030 Fix setting alpha flag of wxBitmap created from HBITMAP
If HBITMAP represents 32-bit bitmap we need to check if this is a bitmap with transparency (ARGB) or maybe RGB only (0RBG) and set alpha flag accordingly.

Closes #18798.
2020-12-28 14:05:56 +01:00
Dimitri Schoolwerth
c6a588424d wxGrid: Fix potential infinite loop with auto-wrap
When using wxGridCellAutoWrapStringRenderer::GetBestWidth() with a cell
containing more newlines than fit, the function never exits because it
keeps on trying to wrap fit into the number of lines based on available
height only.

Fix by also taking into account the number of newlines a cell's text
value has.

Closes #15943.
2020-12-28 00:15:28 +01:00
Dimitri Schoolwerth
ff79db8ac1 wxGrid: Add test for auto-wrapped multi-line cells
Check that a row's height doesn't change when auto-sizing a column with
an auto-wrapping cell containing newlines.

Also currently will cause an infinite loop which will be fixed in the
next commit.

See #15943.
2020-12-28 00:13:17 +01:00
Vadim Zeitlin
23c7805742 Document that wxTE_READONLY can't be used with wxTextEntryDialog
This style doesn't make any sense here, but using it is confusing
because it has the same value as wxCANCEL and is interpreted as it,
rather than as expected by users.

We can't do much about this, but at least document that this flag
doesn't work to prevent people from wasting time trying to use it.
2020-12-27 18:32:10 +01:00
Dimitri Schoolwerth
f6a9466856 Merge pull request #2151 from MaartenBent/clang-warnings
Fix clang warnings and replace tabs.
2020-12-24 10:19:37 +01:00
Gary Allen
ae9a62d5a2 Add wxRibbonToolBar GetToolPos and GetToolRect coord functions 2020-12-23 20:08:39 +02:00
Maarten Bent
a530d645d1 Replace tabs with spaces 2020-12-23 17:03:10 +01:00
Maarten Bent
32a0c57f7a CMake: mark WEBKIT2_JS_LIBRARY as advanced 2020-12-23 17:03:07 +01:00
Maarten Bent
ea4368317f Fix suggest-override warning 2020-12-23 17:03:07 +01:00
Maarten Bent
e889924bc1 Fix sign-compare warning 2020-12-23 17:03:06 +01:00
Maarten Bent
da455f3c0b Fix extra-semi-stmt warning 2020-12-23 17:03:06 +01:00
Maarten Bent
bdfe77c23f Fix redundant-parens warning 2020-12-23 17:03:06 +01:00
Maarten Bent
a6d309447a Fix unreachable-code-return and unreachable-code-break warning 2020-12-23 17:03:06 +01:00
Maarten Bent
0438ca19c1 Fix implicit-fallthrough warning 2020-12-23 17:03:05 +01:00
Maarten Bent
062147ff1c Fix conditional-uninitialized warning 2020-12-23 17:03:05 +01:00
Maarten Bent
037fd6649c Fix unused-parameter warning 2020-12-23 17:03:03 +01:00
Dimitri Schoolwerth
f6a43a6074 configure: Fix failing libpng and zlib detection
Since Apple clang version 12 implicit function declarations by default
are (rightfully) an error resulting in failure to compile the configure
tests for libpng and zlib, which make implicit use of exit.

Fix by using return statements (another solution is including stdlib.h).
2020-12-23 01:53:25 +01:00
Andreas Falkenhahn
d2fc88c03d Mac: Fix truncation of images in wxDataViewCtrl
Take into account a cell's height and adjust the row height accordingly.

See #18868.

Closes #19003.
2020-12-22 02:13:24 +01:00
Dimitri Schoolwerth
4bf117aabd Mac: Adjust wxDataViewCtrl column width calculator
Slightly improve the maximum column width calculator by rounding up
the (non-integer) width of cells using ceil() instead of adding 1
unconditionally.

See #19003.
2020-12-22 02:09:21 +01:00
Andreas Falkenhahn
9ee866551f Mac: Update column width when expanding/collapsing
Adjust autosizing columns of wxDataViewCtrl when items are expanded
or collapsed through the UI as well.

Complements commit e89e76bb82.

See #14939.

See #19003.
2020-12-22 02:04:32 +01:00
Andreas Falkenhahn
9a78bfb553 Mac: Add wxDataViewCtrl::AdjustAutosizedColumns()
Refactor common code and also for upcoming accessibility from
wxCocoaOutlineView.

Part of #19003.

Co-Authored-By: Dimitri Schoolwerth <dimitri@schoolwerth.com>
2020-12-22 02:03:38 +01:00
Dimitri Schoolwerth
1324b5122b Fix missing MAC_OS_VERSION_11_0 with pre-11.0 SDKs
Fix typos preventing MAC_OS_VERSION_11_0 from being defined when using
MacOSX SDK 10.15 or earlier.
2020-12-16 23:56:09 +01:00
Tobias Taschner
a0848c2a45 WebView Edge: Disable status bar
No other webview backend shows it's own integrated status bar
it's safe to assume applications would not expect it.
2020-12-16 15:11:48 +01:00
Vadim Zeitlin
a5c2276965 Remove unused retain count variable in wxOSX font code
This fixes a -Wunused-variable which broke the CI builds.
2020-12-15 15:22:51 +01:00
Stefan Csomor
8fa54ec09a Fixing Memory Leaking CTFontDescriptor Bug
see https://trac.wxwidgets.org/ticket/19012
2020-12-15 08:01:27 +01:00
Artur Wieczorek
9bbaab6e56 Fix converting wxBitmap to wxImage
wxBitmap can have both alpha channel and a mask so alpha channel values
should be passed to the target wxImage even if mask exists.

Closes #19010.
2020-12-14 20:06:35 +01:00
Tobias Taschner
10398b8f72 macOS: Document missing wxWebView features and don't test for them 2020-12-14 13:40:32 +01:00
Tobias Taschner
b509b0d687 macOS: Implement javascript panels for wxWebView
Implement UI callbacks of WKWebView to enable javascript triggered
dialogs for alert(), confirm(), prompt() and file upload dialogs.
2020-12-14 10:18:13 +01:00
Tobias Taschner
4c35689b9d Use two step creation for WKWebView on macOS 2020-12-14 10:18:13 +01:00
Tobias Taschner
bde4a45e9c Remove assert in webview sample
Not all backends return IsBusy() during this callback
2020-12-14 10:18:13 +01:00
Tobias Taschner
4df334cec4 macOS/iOS: Use WKWebView for wxWebView Implementation
WKWebView replaces
WebView on macOS (available since 10.10, deprecated since 10.14) and
UIWebView on iOS (available since 8.0 deprecated since 10.0).
Using WKWebView ensures future compatiblity and unifies the interface
used for iOS and macOS.
2020-12-14 10:18:01 +01:00
Tobias Taschner
6d7f35090d Removed macOS only wxWebKitCtrl
This macOS only class duplicated functionality and code of wxWebView.
2020-12-14 10:17:35 +01:00
Vadim Zeitlin
1b18b1ad5c Merge branch 'platform-info-cpu-arch'
Improvements related to getting the CPU architecture name.

See https://github.com/wxWidgets/wxWidgets/pull/2141
2020-12-13 22:46:39 +01:00
Vadim Zeitlin
15c3ce6710 Add wxPlatformInfo::GetCpuArchitectureName()
This provides the same information as wxGetCpuArchitectureName(), but is
consistent with the other wxPlatformInfo accessors, which also
correspond to the existing wxGetXXX() functions, and makes it more
convenient to use this information in the application code as now
everything is available via wxPlatformInfo instead of having to use
different functions for different pieces.
2020-12-12 15:23:17 +01:00
Vadim Zeitlin
5c4461a154 Return "" and not "Unknown" from wxMSW wxGetCpuArchitectureName()
This is more consistent with the Unix version, and easier to test for
in the application code.
2020-12-12 15:18:29 +01:00