Commit Graph

19439 Commits

Author SHA1 Message Date
Vadim Zeitlin
776c3e5b73 Don't make wxConfig::Do{Read,Write}LongLong() pure virtual
These functions, added in the recent fce8780297 (Add 64-bit integers
support to wxConfig, 2021-03-09) break compilation of existing code
defining classes inheriting from wxConfig, and we can avoid it by using
strings for storing long long values by default -- as this is what
wxFileConfig is doing, and wxRegConfig provides its own overridden
version anyhow.
2021-03-25 14:06:12 +01:00
Vadim Zeitlin
85b944d164 Merge branch 'webrequest-keep-alive'
Ensure that wxWebRequest objects stay alive as long as the request is in
progress.

See https://github.com/wxWidgets/wxWidgets/pull/2292
2021-03-25 14:04:24 +01:00
Paul Cornett
0a28e3267c Remove unused macro definition 2021-03-24 11:25:15 -07:00
Paul Cornett
0995797158 Remove run-time dependencies on X11 backend with GTK3
As with Wayland, the X11 backend may not be available at run-time,
so types defined in it can't be used
2021-03-24 11:25:01 -07:00
Vadim Zeitlin
360268ee25 Extend life time of wxWebRequest while it is in process
We already did it just before processing the state change event, but
this was too late, as the object could have been already deleted by then
and this actually happened with the example from wxWebRequest
documentation.

Do it earlier now, as soon as the request becomes active, which normally
happens when Start() is called, and keep the reference until the event
is processed after the request reaches one of the final states
(completed, failed or cancelled).

Add a unit test checking that deleting the wxWebRequest object doesn't
prevent the request from running to the completion any more.
2021-03-24 17:45:01 +01:00
Vadim Zeitlin
dd23d7dcd2 Merge branch 'safe-show-message'
Show message box from wxSafeShowMessage() in the other ports too, if
possible.

Currently this is done using wxMessageBox() if it can be sure that it's
safe to call and only MSW uses native function which is always safe to
call. Ideal would be to also use a native function under Mac, where it
should also be the case, but this doesn't seem to work for whichever
reason.

See https://github.com/wxWidgets/wxWidgets/pull/2270
2021-03-23 18:59:51 +01:00
Vadim Zeitlin
e442d90b0d Merge branch 'webrequest-build-fixes' of https://github.com/MaartenBent/wxWidgets
wxWebRequest-related build fixes for MinGW.

See https://github.com/wxWidgets/wxWidgets/pull/2283
2021-03-23 14:16:07 +01:00
Maarten Bent
1f36582d87 Initialize wxWinHTTP when wxWebSessionFactoryWinHTTP is created 2021-03-23 00:42:46 +01:00
Maarten Bent
c4343ed2d4 Load winhttp functions dynamically
winhttp cannot be added to the makefiles, because some MinGW distributions
(MinGW 5.3) do not have this library.
2021-03-23 00:42:02 +01:00
Maarten Bent
3cc48e2e56 Fix checking __MINGW64_VERSION_MAJOR for wxUSE_WEBREQUEST_WINHTTP
It is not yet defined for setup.h, so check it in chkconf.h.
Fixes #19105
2021-03-23 00:39:16 +01:00
Vadim Zeitlin
f0398d1267 Remove useless wxIntegerHash assignment operator
This doesn't seem to be doing anything useful but does result in
-Wdeprecated-copy from clang 10, as normally a custom copy ctor should
be defined as well, if the assignment operator is defined.
2021-03-22 18:43:00 +01:00
Stefan Csomor
d1c0d3b18c keeping the OSX specific use of origin for non-native borders
fixes #19108
2021-03-20 22:09:31 +01:00
Vadim Zeitlin
5d6525ccf1 Merge branch 'webview_useragent' of https://github.com/TcT2k/wxWidgets
Add support for custom user agent to wxWebView.

See https://github.com/wxWidgets/wxWidgets/pull/2280
2021-03-19 22:39:00 +01:00
Pierluigi Passaro
b824ed8fe6 Support Wayland in wxGTK wxMediaCtrl
For GTK, the current implementation assumes X11 is the only window option.
Introduce runtime checks to manage Wayland too.

Signed-off-by: Pierluigi Passaro <pierluigi.p@variscite.com>

Closes https://github.com/wxWidgets/wxWidgets/pull/2257
2021-03-19 22:36:59 +01:00
Tobias Taschner
2487a48b66
Implement user agent access for Edge 2021-03-17 22:01:46 +01:00
Paul Cornett
b5d4c6068e Make some member functions const 2021-03-17 09:44:48 -07:00
Tobias Taschner
3d568c7105
Create wxWebViewEdge implementation in constructor
This helps with various potential error when using two step creation
2021-03-17 09:42:01 +01:00
Tobias Taschner
7f7191066b
Implement user agent access for GTK 2021-03-17 09:42:01 +01:00
Tobias Taschner
18f5b01cc6
Implement user agent access for macOS 2021-03-17 09:42:01 +01:00
Tobias Taschner
97e469c255
Add access to user agent for wxWebView
Allow setting a custom user agent for a webview.
Also allow access to the current user agent.
2021-03-16 22:53:00 +01:00
Stefan Csomor
0afd3143d8 support building against iOS 12 SDK
where UIMenuElement is not present yet
2021-03-15 08:43:15 +01:00
Vadim Zeitlin
77593c5996 Add return value to wxSafeShowMessage()
This allows the caller to log the message to the console in addition to
showing the message box, for example. Previously, this would be
impossible to do without getting the duplicates if the message box was
not shown, but now it is.
2021-03-14 13:18:36 +01:00
Vadim Zeitlin
16495e424d Merge branch 'utf8-std-string'
Add wxString::utf8_string().

See https://github.com/wxWidgets/wxWidgets/pull/2265
2021-03-14 13:10:13 +01:00
Vadim Zeitlin
f6194cb797 Merge branch 'config-size_t'
Add support for 64-bit numbers and size_t to wxConfig.

See https://github.com/wxWidgets/wxWidgets/pull/2272
2021-03-13 22:35:01 +01:00
Václav Slavík
aa2a291891 Support underline and strikethrough in wxMarkupToAttrString
Honor wxFont's strikethrough and underline attributes when converting
label markup to NSAttributedString. On macOS, strikethrough and
underline are properties of (rich) text, not of fonts, so a conversion
like this is necessary.
2021-03-13 19:38:16 +01:00
Vadim Zeitlin
0c837e5310 Add support for size_t to wxConfig
Allow writing and reading size_t values directly too, there were not
previously accepted unlike all the other arithmetic types.

Closes #19091.
2021-03-13 15:15:37 +01:00
Vadim Zeitlin
fce8780297 Add 64-bit integers support to wxConfig
Serialize them to strings in wxFileConfig, just as we always did for
long, but use wxRegKey support for storing them directly to the registry
in wxRegConfig.
2021-03-13 15:14:58 +01:00
Vadim Zeitlin
12d191823a Merge branch 'stc-typo-fixes'
Fix minor typos in STC docs.

See https://github.com/wxWidgets/wxWidgets/pull/2276
2021-03-13 13:35:28 +01:00
Vadim Zeitlin
5a623d3a4e Regenerate STC files after the typo fixes
Rerun src/stc/gen_iface.py.
2021-03-13 13:35:14 +01:00
Vadim Zeitlin
cc97e69346 Apply Scintilla doc fixes to the correct files
Back-propagate the fixes of 28d705424b (Fix double words and article
mismatches in docs., 2021-03-10) to interface/wx/stc/stc.h to the files
that this header is generated from to avoid losing these changes when
it's regenerated the next time.

See https://github.com/wxWidgets/wxWidgets/pull/2273
2021-03-13 13:17:51 +01:00
Artur Wieczorek
2a536c359c Fix visual state of enabled/disabled wxPropertyGrid
wxPropertyGrid needs to be refreshed while enabling/disabling to display
proper visual states of all wxPGProperty items.
2021-03-12 21:41:40 +01:00
Vadim Zeitlin
3f2c84d4a9 Add 64-bit numbers support to wxRegKey
This uses the native registry support for 64-bit values available since
Windows XP.

Note that SetValue64() can't be just called SetValue() as this would
introduce ambiguities when writing an int or an enum to the registry.
This could be avoided by providing overloads for all the arithmetic
types, but it's arguably better to be more clear about what exactly is
being written to the registry in this low-level class and using a
different name is definitely simpler.
2021-03-09 21:09:42 +01:00
Vadim Zeitlin
eb33447c39 Use template function to avoid code duplication in wxRegConfig
Don't repeat exactly the same code for 3 different types, just use a
template function instead.

Change the existing TryGetValue() helpers to take all output parameters
consistently by pointer, rather than taking only long by pointer and the
other by reference. This allows to isolate the inconsistency of the type
of wxRegKey::QueryValue() parameter in a single place here, hiding it
from the rest of wxRegConfig code.

Add an extra unit test for writing/reading longs to/from wxRegConfig.
2021-03-09 19:15:03 +01:00
Tobias Taschner
4ab9ee32a8
macOS: Implement access to dev tools for wxWebView 2021-03-08 12:32:53 +01:00
Vadim Zeitlin
e00d5e131b Use new wxAppTraits::SafeMessageBox() in wxSafeShowMessage()
This allows to show message boxes in ports other than wxMSW too by doing
it only when it is safe, i.e. when the GUI is initialized, while still
keeping the old code directly using the native MessageBox() function for
MSW for maximal robustness.
2021-03-07 23:51:54 +01:00
Vadim Zeitlin
39883a270a Disable main window when showing msgbox in wxSafeShowMessage()
Pass correct parent HWND to ::MessageBox() in order to disable the
window while the message box is shown, as this function is supposed to
be similar to modal wxMessageBox() and it was unexpected that the
application could be reentered via the event handlers from inside it.

This required adding wxAppTraits::GetMainHWND() in order to only use the
HWND in GUI applications from the function defined in non-GUI code.
2021-03-07 23:51:54 +01:00
Vadim Zeitlin
69e48f036b Add wxApp::GetMainTopWindow() wrapper
This trivial function just allows to avoid checking if wxTheApp is not
null before calling GetTopWindow() on it.

Replace the existing "wxTheApp && wxTheApp->GetTopWindow()" calls with
wxApp::GetMainTopWindow().

No real changes.
2021-03-07 23:51:54 +01:00
Vadim Zeitlin
5ddf57c150 Add wxModule::AreInitialized()
This internal function will be useful to check if the modules are
already initialized, i.e. if the library is in the "steady state"
between the end of the initialization and the beginning of the cleanup
phases.
2021-03-07 20:39:09 +01:00
Vadim Zeitlin
e10e721120 Get rid of wxList and wxArray in wxModule code
Simply use wxVector instead, this shouldn't be less efficient (we rarely
remove the modules from the list and iterating over a vector should
actually be faster, as well as consuming less memory), but it avoids
ugly macros, is simpler to use and to debug and will be trivial to
replace with std::vector<> in the future.

No real changes, this is just pure cleanup.
2021-03-07 20:39:09 +01:00
Vadim Zeitlin
628514bcd3 Rename static wxModule::m_modules to use "ms_" prefix
No real changes, just use consisting naming convention.

Better late than never.
2021-03-07 20:39:09 +01:00
Vadim Zeitlin
0f8e976ac3 Add wxString::utf8_string()
This adds a yet another conversion function, which is not ideal, but
still better than having to write ToStdString(wxConvUTF8) every time for
losslessly converting wxString to std::string: not only this is too
long, but it's also too easy to forget to specify wxConvUTF8, resulting
in data loss when using non-UTF-8 locale.
2021-03-06 15:12:07 +01:00
Vadim Zeitlin
bf8be6c58d Merge branch 'mac-filedlg-improvements' of https://github.com/discnl/wxWidgets
macOS wxFileDialog improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2234
2021-03-06 12:18:43 +01:00
Andriy Byelikov
b2d97d1393 Add support for English locale for Israel (en_IL)
This locale is recognized by glibc, so add it to the known locales
database.

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

See #19082.
2021-03-05 18:51:10 +01:00
Vadim Zeitlin
3701baecde Merge branch 'webview_script_message' of https://github.com/TcT2k/wxWidgets
Add WebView script message and user scripts.

See https://github.com/wxWidgets/wxWidgets/pull/2237
2021-03-05 18:44:46 +01:00
Paul Cornett
30637ad3b6 Make wxGridEvent methods GetRow() and GetCol() const and not virtual
See #19085
2021-03-05 07:38:32 -08:00
Paul Cornett
4388b9bd6b Make some member functions const 2021-03-04 11:49:33 -08:00
Tobias Taschner
80c04e3941
Merge branch 'master' into webview_script_message 2021-03-01 09:57:13 +01:00
Vadim Zeitlin
afb57182e1 Merge branch 'gcc-edge'
Make it possible to build wxWebViewEdge with gcc or clang too.

Closes https://github.com/wxWidgets/wxWidgets/pull/2245
2021-03-01 00:09:52 +01:00
Maarten Bent
7532532800 Mention GCC/Clang support in wxWebViewEdge documentation
And add a comment explaining the name of the EventRegistrationToken include guard.
2021-03-01 00:09:23 +01:00
Maarten Bent
fc3cfb67cf Add missing UUIDs for wxWebViewEdge 2021-03-01 00:09:23 +01:00