Commit Graph

70005 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
be5f1344b6 Add some comments describing wxWebSession methods
No real changes.
2020-12-27 13:01:49 +01:00
Vadim Zeitlin
71d5729171 Make wxWebSessionFactory private
Having wxWebSessionFactory part of the public API implies keeping
compatibility with the possible ways of implementing it which is too
restrictive for no good reason, so move this class to the private header
and don't document it nor wxWebSession::RegisterFactory() (which is now
private).
2020-12-27 01:03:08 +01:00
Vadim Zeitlin
e5bd5a926c Move backend-specific wxWebRequest headers to private subdirs
There is no need to make these headers public and keeping them private
will allow making backwards-incompatible changes to them in the future.
2020-12-26 17:00:07 +01:00
Vadim Zeitlin
8b632bb892 Enable wxWebRequest tests by default
Don't require WX_TEST_WEBREQUEST_URL environment variable to be set, but
only allow defining it to override the default https://httpbin.org value
or to disable the tests by setting it to 0.
2020-12-26 16:43:03 +01:00
Vadim Zeitlin
6a064c85d4 Compile even less code when wxUSE_WEBREQUEST==0 in the test
Move the check slightly higher, there is no need to include the headers
if we're not going to compile any tests anyhow.
2020-12-26 16:00:03 +01:00
Maarten Bent
13d0e0a152 Fix linking with libcurl under MSW when using CMake
Enable CMP0060 policy to use full path for the library.
2020-12-26 15:56:56 +01:00
Maarten Bent
1f504d3c5c Fix using wxThreadHelper in DLL builds
Remove the unnecessary and actually harmful WXDLLIMPEXP_BASE from the
declaration of wxThreadHelperThread and wxThreadHelper classes that only
have inline methods.
2020-12-26 15:54:43 +01:00
Vadim Zeitlin
45757c6728 Fix harmless warnings about unused Objective C methods parameters
Add wxUnusedVar() to suppress them (WXUNUSED() can't be used with
Objective C functions).

No real changes.
2020-12-26 15:26:41 +01:00
Vadim Zeitlin
139db5cc16 Fix harmless warning about missing return type in initWithSession:
The return type defaults to "id" anyhow, but it's better to specify it
explicitly.
2020-12-26 12:31:07 +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
889e974700 Fix typo in wxWebSessionDelegate name
No real changes, just add the missing "a".
2020-12-13 20:45:18 +01:00
Maarten Bent
2f77cbcdcd Remove accidental empty statement in wxWebRequest curl backend
No real changes, just avoid a warning.
2020-12-13 17:38:30 +01:00