Commit Graph

70478 Commits

Author SHA1 Message Date
Vadim Zeitlin
3c58e79339 Don't start CI builds for the changes to message catalogs only
We currently don't use these files in the existing builds.

It might be a good idea to add another GitHub Action workflow checking
the message catalogs compilation that would be executed _only_ for the
changes to them, but this can/will be done later.
2021-03-07 23:48:25 +01:00
Vadim Zeitlin
dfc1ae5de4 Ignore MSW-only changes for PR builds on GitHub CI too
This extends the grandparent commit to apply to pull requests and not
only to the master builds.
2021-03-07 23:47:27 +01:00
Maarten Bent
3198ed0b18 CMake: reset webview2 package dir if it does not exist anymore
And make the variable internal so it does not create an 'Ungrouped Entries' group in cmake-gui.
2021-03-07 22:06:46 +01:00
Maarten Bent
560656c699 CMake: do not use target webview in monolithic build 2021-03-07 22:06:46 +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
fbd23270e3 Remove CppUnit boilerplate from wxModule unit test
Also use wxString instead of fixed size char array and wxStrcat().
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
Václav Slavík
bc28cb42c2 Fix wxCheckListBox checkbox size on macOS
Decrease the size of checkbox column so that it's not downright
excessive.
2021-03-07 18:26:24 +01:00
Václav Slavík
1d23f7befe Don't show focus ring on wxListBox
In native OS X apps, focus ring is not shown around NSTableView controls
(focus is indicated differently, with selection's color).

See eece498 for the same fix in wxDataViewCtrl.
2021-03-07 18:25:30 +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
0aacc6a9ab Remove CppUnit boilerplate in std::string interoperability tests
No real changes, just don't use compatibility macros and remove the
completely useless test case.
2021-03-06 15:05:23 +01:00
Vadim Zeitlin
8d01aaf783 Make WebRequest::Get::Param unit test more forgiving
The simple test added in 59a8f26b01 (Add a unit test for wxWebRequest
query using URL parameters, 2021-03-06) worked when using httpbin.org,
but not when running httpbin locally, as it doesn't pretty-print JSON by
default.

Skip optional whitespace to make it work in both cases.
2021-03-06 14:44:56 +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
Vadim Zeitlin
26635c2718 Merge branch 'webrequest-fix-param'
Fix URL parameters handling in WinHTTP wxWebView backend.

See https://github.com/wxWidgets/wxWidgets/pull/2264
2021-03-06 12:16:26 +01:00
Vadim Zeitlin
59a8f26b01 Add a unit test for wxWebRequest query using URL parameters
Check that passing URL parameters in the query string works as expected
(this was broken with WinHTTP backend until the parent commit).
2021-03-06 12:11:59 +01:00
Vadim Zeitlin
3c92573dd7 Recommend using wxStaticBox as parent more strongly
Not doing it, i.e. creating the window inside the static box as its
siblings, rather than children, may appear to work, but actually doesn't
always do it, for example the windows are not shown correctly when using
RTL locale.

Closes #19086.
2021-03-05 22:53:27 +01:00
Artur Wieczorek
c1fa4cc7be Refactor: Use dedicated Win API to modify RECT structures 2021-03-05 20:11:04 +01:00
PB
783244af21 Do not trigger build by change in any MD file
Co-authored-by: VZ <vz-github@zeitlins.org>
2021-03-05 19:41:05 +01:00
Vadim Zeitlin
39a46db345 Merge branch 'gtk-x-checks-simplify'
Simplify X11 checks and make them work when using Wayland-only GTK.

See https://github.com/wxWidgets/wxWidgets/pull/2261
2021-03-05 18:52:23 +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
7bcac7bfde Merge branch 'unix-default-locale'
Improve handling of default locale and other locale-related fixes.

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

Closes #11594.
2021-03-05 18:48:30 +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
Artur Wieczorek
613dce3d4b Adjust picker button size for generic wxDirPickerCtrl and wxFilePickerCtrl
For generic wx{Dir|File}PickerCtrl with text field the picker button
should be as high as the associated text field also when
wx{FLP|DIRP}_SMALL flag is set.

Closes #19087.
2021-03-04 19:14:00 +01:00
Tobias Taschner
a6c9fd2603 Fix WinHTTP GET parameter
An additional ? was send to the server, resulting in ignoring the first get parameter
2021-03-04 17:00:45 +01:00
Artur Wieczorek
1c57699e92 Add ability to set bitmap margins for wxButton in widgets sample
This is to demonstrate the margins between the bitmap and the text
of the button.
2021-03-02 22:47:37 +01:00
Artur Wieczorek
ae5593bd23 Fix wxButton page in widgets sample
Enable image alignment radio box only if button with text and image
is active because it is applicable only in this case.
2021-03-02 22:34:44 +01:00
Vadim Zeitlin
e9ea0f53f6 Refactor platform checks in wxLocale::Init()
Avoid the need for ugly WX_NO_LOCALE_SUPPORT macro at the cost of a
couple of extra #ifs, which seems to be a worthy trade-off.

This also allows making the code calling setlocale("") for the default
language platform-independent.

No real changes.
2021-03-02 22:07:44 +01:00
Vadim Zeitlin
502114261a Handle wxLANGUAGE_DEFAULT in wxLocale specially under MSW too
Even if we do know about the system language, it's still better to let
OS/CRT handle it, as we may not know enough about it. E.g. "system
language" may actually be a mix of the different languages and formats
and we don't handle this case at all, while OS/CRT do just fine.
2021-03-02 22:07:44 +01:00
Vadim Zeitlin
9c4ab145e9 Add SetThreadUILanguage() wrapper
Make it possible to reuse the code dynamically loading this function
from elsewhere.

No real changes.
2021-03-02 22:07:44 +01:00
Vadim Zeitlin
9600c29ff2 Fix default language determination in wxLocale under MSW
We must use GetUserDefaultUILanguage() and not GetUserDefaultLCID().
Although still not ideal, this is much better when the UI language and
the locale differ: when everything is in some language, it's better to
use this language and wrong date/number format than use correct
date/number format but a wrong language.

See #11594.
2021-03-02 22:07:44 +01:00
PB
79363eb8fd Add more ignored paths for GitHub CI
GitHub CI does not build for Microsoft Windows. Therefore, do not start builds
for changes made in folders used only for MSW.
2021-03-02 20:30:46 +01:00
PB
93773b0b65 Add more ignored paths for AppVeyor CI
AppVeyor CI builds for Microsoft Windows only. Therefore, do not start builds
for changes made only in dfb, gtk, gtk1, motif, unix, and x11 folders.

Additionally, do not start the builds when only an *.md file in the root
folder changes.

Lastly, ignore all changes in the demos folder: Demos are not built by AppVeyor at all.
2021-03-02 20:21:21 +01:00
Paul Cornett
0d80050057 Make wxGCDC behavior with 0-width wxPen consistent with MSW wxDC
MSW uses a 1-pixel width in that case. See #19077
2021-03-02 10:50:39 -08:00
PB
9d0aee5ee6 Fix using invalid string index in wxIsAbsolutePath()
Check if the path is at least two characters long before accessing its
second character.

Add test cases for wxIsAbsolutePath() on MS Windows.

Closes https://github.com/wxWidgets/wxWidgets/pull/2262
2021-03-02 16:00:59 +01:00
Vadim Zeitlin
9a84e0b25e Don't require X11 in CMake builds using Wayland-only GTK
X11 headers and libraries are only required if we're actually using X11
which may not be the case.

This allows to build wxGTK on the systems using Wayland-only GTK.
2021-03-01 13:32:57 +01:00
Vadim Zeitlin
a8e918727a Only include X11 headers when we actually need X11 support
These headers may not be available at all when building wxGTK with
Wayland-only GTK version.
2021-03-01 13:06:17 +01:00
Tobias Taschner
80c04e3941 Merge branch 'master' into webview_script_message 2021-03-01 09:57:13 +01:00
Vadim Zeitlin
b8f63fc7c5 Skip wxLocale wxLANGUAGE_DEFAULT test in ANSI builds
The test fails there, but we don't really care about it, Unicode is
required for any level of acceptable locale support anyhow.
2021-03-01 00:22:39 +01:00
Maarten Bent
401d547b2a Fix -Wdeprecated-copy warning when using Scintilla Window
Don't use the copy constructor, use a constructor accepting the windowID.

Closes https://github.com/wxWidgets/wxWidgets/pull/2259
2021-03-01 00:11:03 +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
272c903234 Silence unknown pragmas warning in the WebView2 header
Using wxGCC_WARNING_SUPPRESS(unknown-pragmas) around the webview2 header does
not work, so suppress it for the entire webview project.
2021-03-01 00:09:23 +01:00
Maarten Bent
fc3cfb67cf Add missing UUIDs for wxWebViewEdge 2021-03-01 00:09:23 +01:00
Maarten Bent
09bc566b60 Support building wxWebViewEdge with GCC or Clang
Add EventToken.h with EventRegistrationToken implementation, that can be used by the WebView2 header.
2021-03-01 00:09:23 +01:00
Maarten Bent
b43803703d Move Callback implementation to separate header file 2021-03-01 00:09:23 +01:00
Maarten Bent
66d314c232 Implement QueryInterface of wxWebViewEdge CInvokable 2021-03-01 00:09:23 +01:00
Maarten Bent
156eda92d7 Use WRL when building with MSVC 2021-03-01 00:09:23 +01:00