Commit Graph

71396 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
373a3f8c57 Remove obsolete Borland hdrstop pragmas from the new code
See f57f214122 (Remove BCC-specific hdrstop pragma from everywhere,
2020-10-12).
2020-12-13 17:29:05 +01:00
Vadim Zeitlin
edd45bd5a1 Disable wxUSE_WEBREQUEST when using MinGW32
We can't compile it with this compiler using WinHTTP backend.
2020-12-13 17:17:06 +01:00
Vadim Zeitlin
76499a3e8b Check curl_multi_init() return value
Return NULL wxWebRequest if this function fails.

Also get rid of another unnecessary Initialize() function.
2020-12-13 17:07:11 +01:00
Vadim Zeitlin
77d25edce2 Translate the error message given in case libcurl init failure
This message is user-visible and so should be translated.
2020-12-13 16:58:57 +01:00
Vadim Zeitlin
7027f66a9a Simplify code by folding {Initialize,Cleanu[}CURL() in the caller
There doesn't seem to be any need to have separate functions when they
are just trivial wrappers.
2020-12-13 16:58:47 +01:00
Vadim Zeitlin
9cc35c54d2 Simplify libcurl initialization by using CURL_GLOBAL_ALL
Using anything else is not recommended by libcurl documentation and it's
not clear why would we need it, so just follow the official advice and
pass CURL_GLOBAL_ALL.
2020-12-13 16:46:24 +01:00
Maarten Bent
ab795fa68c Check for winhttp.h presence in CMake too 2020-12-13 16:35:34 +01:00
Vadim Zeitlin
c6b83194f1 Fix configure wxWebRequest detection and warning logic
Only use wxUSE_WEBREQUEST_{URLSESSION,WINHTTP} under the platforms where
they make sense.

Turn wxUSE_WEBREQUEST off if no backends are available and warn about
it, even under MSW/macOS platforms where this wasn't done previously.
2020-12-13 16:34:47 +01:00
Vadim Zeitlin
181be127a5 Simplify wxUSE_WEBREQUEST_XXX logic
Remove automatic definition of wxUSE_WEBREQUEST depending on whether
wxUSE_WEBREQUEST_XXX are defined and follow the same approach as with
wxUSE_GRAPHICS_XXX, i.e. define wxUSE_WEBREQUEST_XXX as wxUSE_WEBREQUEST
by default instead.

Move wxUSE_WEBREQUEST_WINHTTP to wxMSW-specific file, it doesn't need to
be in common one (unfortunately this can't be done for the Mac-specific
wxUSE_WEBREQUEST_URLSESSION yet, because macOS-specific settings are not
injected into setup.h.in currently).

Also fix test for winhttp.h availability: it seems to be present in all
MinGW64 distributions, but not in MinGW32, so test for this and not for
gcc version.

Finally remove the now unnecessary test for macOS 10.9, as we only
support 10.10+ anyhow by now.
2020-12-13 16:34:47 +01:00