Commit Graph

70412 Commits

Author SHA1 Message Date
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
Maarten Bent
a8b726359b Format wxWebViewEdge Callback code 2021-03-01 00:09:23 +01:00
Maarten Bent
ad1219d0a2 Fix building with MSVC 32 bit 2021-03-01 00:09:23 +01:00
Maarten Bent
84b19a0ce0 Use the same function signature as the WebView2 SDK 2021-03-01 00:09:23 +01:00
nns52k
b465a95dcc Make it possible to compile wxWebView Edge backend with gcc
Remove the requirement to include wrl/event.h so that GNU C++ (maybe
Clang C++ as well) can compile this file without error.
2021-03-01 00:08:08 +01:00
nns52k
df20e5ec76 Fix case of WebView2.h in the #inclue directive
Using the correct case is important when using case-sensitive file
systems as when cross-compiling, for example.
2021-03-01 00:08:08 +01:00
PB
a75aa78263 Fix dragging file in DnD sample
At least on Microsoft Windows, it is possible to start dragging an unselected
wxTreeCtrl item. Therefore, in wxEVT_TREE_BEGIN_DRAG handler do not use the
path that is currently selected in the control but the one that is actually
being dragged.

Closes https://github.com/wxWidgets/wxWidgets/pull/2258
2021-03-01 00:03:21 +01:00
Vadim Zeitlin
fa3cf06273 Avoid possible "unreachable statement" warnings
Don't return unconditionally before another return. Somehow gcc doesn't
warn about it, but other compilers (and static analyzer tools)
definitely do.

No real changes.
2021-02-28 23:59:51 +01:00
Vadim Zeitlin
f11db09e9b Ad wxHAS_X11_SUPPORT helper to simplify the code
This is much more readable than the existing (and now duplicated)
__WXGTK__ || !__WXGTK20__ || GDK_WINDOWING_X11 check.

No real changes.
2021-02-28 23:58:07 +01:00
Vadim Zeitlin
810b342411 Avoid useless check for GTK_CHECK_VERSION
Just use it inside the existing check for GTK itself.

No real changes.
2021-02-28 23:53:49 +01:00
Vadim Zeitlin
d03f193719 Recognize "ll_LL" as at language "ll" in GetSystemLanguage()
If we can't find an exact match for the system locale in the database,
try to at least find the corresponding language.

This is almost certainly what the intention of the original code was, as
otherwise the entire loop was useless because it couldn't find anything
that wouldn't have been found in the loop just above.

This allows to correctly load German translations when using unsupported
locale such as "de_IT", for example.

See #19082.
2021-02-28 23:39:20 +01:00
Scott Talbert
f6a53b59b2 Fix regression in wxGetKeyState() on GTK3 w/ X11
wxGetKeyStateGTK() is intended to be used only with non-X11 GTK backends.
wxGetKeyStateX11() should still be used on GTK3 w/ X11 as the GTK
variant does not provide all key states.
2021-02-28 14:11:26 -08:00
Vadim Zeitlin
73b41dda91 Remove redundant #if/#endif in Unix locale code
Put both Unix-only functions inside the same #ifdef __UNIX__.

No real changes.
2021-02-28 22:50:35 +01:00
Vadim Zeitlin
2e8e0197d7 Add wxSetlocaleTryAll() helper to simplify Unix locale code
Define the function calling setlocale("xx_YY") first and then just
setlocale("xx") if the former failed, instead of doing the same thing
manually in 3 different places.

Also avoid attempting the second setlocale() call completely if there is
no "_YY" part in the first place.

No real changes.
2021-02-28 22:48:52 +01:00
Tobias Taschner
5e35e6c635 Clear script ids in RemoveAllUserScripts() 2021-02-28 22:38:09 +01:00
Tobias Taschner
5a30bbe38f Apply suggestions from code review
Co-authored-by: PB <PBforDev@gmail.com>
2021-02-28 22:33:15 +01:00
Tobias Taschner
e8371824bd Disable new methods for webkit1 2021-02-28 20:48:01 +01:00