Commit Graph

67720 Commits

Author SHA1 Message Date
Paul Cornett
0a56399f3c Fix TLW decorations when GTK3 is using Client Side Decorations
We need to avoid setting Window Manager decorations or using deferred show
See #17971
2020-01-30 01:05:45 -08:00
Paul Cornett
63b1f00eb8 Allow wxStrto... functions to accept nullptr 2020-01-27 11:33:05 -08:00
Paul Cornett
26f58bdf78 Fix base class call of virtual SetFont() in wxGenericListCtrl
Hard-coding 'wxWindow' improperly bypasses an override in wxControl on GTK3
2020-01-27 11:27:39 -08:00
Paul Cornett
d03a5c1155 Remove unused member function declaration 2020-01-26 09:50:56 -08:00
Paul Cornett
47163f6433 Simplify boolean expression, 'A != false' is just 'A'
And correct associated assert message
2020-01-26 09:47:29 -08:00
Paul Cornett
2db487c67e Avoid -Wundef warning when libpng support is disabled 2020-01-26 09:44:17 -08:00
Paul Cornett
0ec2c9d8f2 Change some misleading formatting
Don't put an unrelated compound statement directly below an 'if', which makes
it way too easy to mistake it as the body of the 'if'. No real changes.
2020-01-26 09:34:18 -08:00
Paul Cornett
0a2c05ae92 Initialize members in declaration order, avoids -Wreorder warning 2020-01-26 09:25:56 -08:00
Ian McInerney
654ef6d729 OSX: Only update the window level if it has changed
Updating the level could lead to windows being reordered in that level
on some OS versions, so for safety don't do it unless it is needed.
2020-01-24 00:17:01 +00:00
Ian McInerney
f5c3d9d1fb OSX: Ignore wxHSCROLL and wxVSCROLL in wxDataViewCtrl
Using these two style flags in wxDataViewCtrl causes the library
to seg fault when trying to create the scrollbars. The wxDataViewCtrl
has scrollbars already without these flags.

Closes #17028
2020-01-24 00:17:01 +00:00
Ian McInerney
278d98b2b6 OSX: Draw background in wxGrid cell when editor is open
This was removed when Quick Draw was in use due to an issue,
but Quick Draw has been removed, so re-enable it.
2020-01-23 23:21:08 +00:00
Tobias Taschner
c9c2d1fba4 Remove unused carbon files
These files where no longer referenced by any build system
and where probably left overs from before carbon was removed.
2020-01-23 21:13:11 +01:00
Artur Wieczorek
125d2fe90e Use dedicated function to check if wxPGProperty is of category type
We have a dedicated function for this purpose so there is no need to check
the flag directly.
2020-01-23 19:46:59 +01:00
Artur Wieczorek
9ac6c7906a Use conditional operators to simplify statements 2020-01-23 19:45:51 +01:00
Artur Wieczorek
750f3cb783 Return invalid wxPGCell on attempt to get a cell for unattached wxPGProperty
This is to avoid crash if GetCell() would be called for wxPGProperty
not currently attached to a wxPropertyGrid.
2020-01-23 19:42:37 +01:00
Artur Wieczorek
a5d9fe2931 Improve parameter validation in wxPGProperty
Replace wxASSERT_MSG with wxCHECK_MSG to simplify checking that we
don't crash even if wxPGProperty is not attached to a wxPropertyGrid.
2020-01-23 19:41:39 +01:00
Artur Wieczorek
590547b87e Directly check value of wxPG_USE_RENDERER_NATIVE macro
We can check wxPG_USE_RENDERER_NATIVE macro value directly and hence there
is no need to introduce and check a helper macro
wxPG_USE_NATIVE_FOCUS_RECT_RENDERER.
2020-01-23 19:40:02 +01:00
Artur Wieczorek
ce4eaab20a Don't use wxINVERT mode in drawing focus rectangle for wxPGProperty
wxPGProperty of category type is drawn every time (with or without focus
rectangle) on the clear background so there is no need to erase focus
rectangle by overdrawing it in wxINVERT mode. It can be safely drawn in
wxCOPY mode.

See #16890.
2020-01-23 19:29:43 +01:00
Tobias Taschner
7a729e8a85 Add handler for ICNS files (wxBITMAP_TYPE_ICON)
After some recent changes bitmaps and icons with the type
wxBITMAP_TYPE_ICON could no longer be loaded. This implements a handler
for this (macOS only) bitmap type like the handler for
wxBITMAP_TYPE_ICON_RESOURCE.
2020-01-23 14:44:59 +01:00
Vadim Zeitlin
fa74c30d09 Remove commented out code using wxINVERT from wxListCtrl
No real changes, just remove the old code using wxINVERT logical
function which doesn't work with wxGTK3/wxMac anyhow and so is really
not worth keeping.

See #16890.
2020-01-23 01:17:36 +01:00
Vadim Zeitlin
396dd6cf0b Document that wxINVERT is not supported under wxGTK3 and wxMac
Also explain how to update the existing code using it.

See #16890.
2020-01-23 01:11:58 +01:00
Vadim Zeitlin
767c07c040 Merge branch 'webview-edge'
Add support for (optionally) using Edge-based wxWebView.

See https://github.com/wxWidgets/wxWidgets/pull/1700
2020-01-22 03:38:00 +01:00
Vadim Zeitlin
5d9e1ceb80 Show whether Edge backend is used in the webview sample
Allow to see at a glance whether Edge is being used or not.
2020-01-22 03:37:12 +01:00
Vadim Zeitlin
0b2dd516c1 Slightly improve Edge webview backend setup instructions
Make it even more clear where should the files go and which files should
be copied, to avoid any ambiguity.
2020-01-22 03:36:38 +01:00
Vadim Zeitlin
f6b79fdf8f Rebake gcc makefiles accidentally modified in this branch
Undo the changes due to the use of different version of bakefile 0.x.
2020-01-22 03:24:57 +01:00
Vadim Zeitlin
d1da66b5f2 Merge branch 'fix-build-when-something-disabled'
Fix build when using --disable-{intl,sysoptions}.

See https://github.com/wxWidgets/wxWidgets/pull/1712
2020-01-22 03:17:47 +01:00
Lauri Nurmi
565034aa49 Fix misleading indentation in Motif code
This commit contains whitespace-only changes (including adding one extra
new line) and no real ones.

Closes https://github.com/wxWidgets/wxWidgets/pull/1715
2020-01-20 22:27:26 +01:00
Vadim Zeitlin
cc91065c83 Remove an extra block needed after the previous commit
Also add a comment for clarity.

No real changes.
2020-01-20 21:57:36 +01:00
Lauri Nurmi
04d71c80e3 Fix build when configured with --disable-sysoptions 2020-01-20 22:18:55 +02:00
Lauri Nurmi
4901b3784a Fix wxGTK build when configured with --disable-intl
That is, #include scopedptr.h explicitly in nonownedwnd.cpp.
2020-01-20 22:18:55 +02:00
pan93412
2d89c3fad0 Updaye zh_TW translations
Closes https://github.com/wxWidgets/wxWidgets/pull/1714
2020-01-20 20:54:49 +01:00
Vadim Zeitlin
68d7cb5082 Merge branch 'msw-fix-radiobtn-and-initial-focus'
Fix problems with focus due to the pending focus mechanism used by
wxRadioButton in wxMSW.

See https://github.com/wxWidgets/wxWidgets/pull/1713
2020-01-20 20:51:59 +01:00
Václav Slavík
7a5618df77 Silence Xcode 11 warnings about shadowing read() 2020-01-20 19:19:40 +01:00
Václav Slavík
11780f69aa Fix typos in AddStdXRCID_Records(): , instead of ; 2020-01-20 19:18:40 +01:00
Vadim Zeitlin
db4c025e42 Document wxRadioButton relationship with focus in wxMSW
Explain that calling SetValue(true) may change the focus, as this is
not really obvious (and doesn't happen in the other ports).
2020-01-20 13:21:44 +01:00
Vadim Zeitlin
ec07635801 Don't recurse upwards when updating pending focus in wxMSW
This is unnecessary, we only need to update the pending focus in the
immediate parent window to prevent a wrong radio button from being
focused (and hence selected) when it regains focus, there is no good
reason at all to interfere with the focus in the grandparent (and
higher) windows.

Doing this was not only useless, but actually harmful, as it overrode
explicit calls to SetFocus() in the user code, so just stop doing it.
This also allows to avoid having 2 functions related to this and keep
just a single virtual WXSetPendingFocus() one.

Closes #18653.
2020-01-20 13:16:41 +01:00
Vadim Zeitlin
724621929d Improve the check for TLW in focus handling code
Use IsTopNavigationDomain() instead of IsTopLevel() to do the right
thing for MDI child frames too.
2020-01-20 12:42:18 +01:00
Vadim Zeitlin
50a6e80be5 Fix checking for the deepest shown window in focus handling code
wxSetFocusToChild() could recurse to the parent TLW, which was clearly
nonsensical as it means that restoring last focus in a dialog could end
up setting it to the parent frame.

Fix this by breaking out of the loop as soon as we reach a TLW.

See #18653.
2020-01-20 00:32:21 +01:00
Tobias Taschner
caf9285609 Improved JSON string parsing 2020-01-19 21:32:11 +01:00
Artur Wieczorek
ed8fd1893a Avoid compilation warning under OS X 10.11
NSWindow.allowsAutomaticWindowTabbing property
is available since SDK 10.12.
2020-01-19 20:27:01 +01:00
Vadim Zeitlin
b9038a1e8c Merge branch 'msw-headerctrl' of https://github.com/MaartenBent/wxWidgets
Fix applying style of MSW wxHeaderCtrl and add tests for doing it to the
widgets sample.

See https://github.com/wxWidgets/wxWidgets/pull/1710
2020-01-19 17:49:40 +01:00
Vadim Zeitlin
c1ef9f1f2d Merge branch 'dvc-col-update'
Avoid recursively updating wxHeaderColumns during resize in the generic
wxDataViewCtrl implementation.

See https://github.com/wxWidgets/wxWidgets/pull/1711
2020-01-19 17:48:19 +01:00
Vadim Zeitlin
a73194f6b4 Allow parsing all fractional sizes in wxFont descriptions
Remove the check that the size representation was the same as float and
as double, which was supposed to catch various edge cases (NaNs, huge
numbers etc) but actually caught plenty of perfectly valid font sizes
such as 13.8 that simply lost precision when converting from double to
float.

Just check that the size is positive and less than FLT_MAX to avoid
using values that really don't make sense as font sizes.

Also add a unit test checking that using fractional font sizes in
description string works as expected.

Closes #18590.

Closes https://github.com/wxWidgets/wxWidgets/pull/1707
2020-01-19 17:46:55 +01:00
Maarten Bent
b3f259c99c Fix reverting to standard cursor in widgets sample
Don't set the cursor to wxSTANDARD_CURSOR, but set it to wxNullCursor so the
default system cursor is used.
2020-01-19 14:56:48 +01:00
Maarten Bent
a31cf55a8d Add more columns to Header control in widgets sample
Show column settings horizontally.
Fix binding to header control events after it is recreated.
2020-01-19 14:56:45 +01:00
Maarten Bent
fd9df06d35 Fix applying header style of wxMSWHeaderCtrl
Call SetWindowStyleFlag when creating the control. Apply wxHD_BITMAP_ON_RIGHT
style. Get rid of the helper function.
2020-01-19 14:55:39 +01:00
Artur Wieczorek
28098259a8 Suppress MSVC++ performance warning
MSVC++ doesn't seem to honour implicit int -> bool conversion and raises
warning C4800: "'int': forcing value to bool 'true' or 'false' (performance
warning)".
2020-01-19 09:56:24 +01:00
Vadim Zeitlin
b02fbafb96 Don't update wxDataViewColumn after it was resized interactively
Previously, the column was updated, i.e. wxHeaderCtrl::UpdateColumn()
was called, after the column width was changed interactively by the
user. This was unnecessary and actually harmful as it resulted in
recursion and display corruption.

Stop doing this by adding yet another width-related function to the
generic wxDataViewColumn called WXOnResize(), which just updates the
main window display, but doesn't update the header at all, and calling
it instead of SetWidth(), which does both, when the column is resized.

Closes #18245.
2020-01-19 03:28:13 +01:00
Vadim Zeitlin
655e29ff1a Remove a duplicate OnColumnChange() call
If the width really changed, wxDataViewColumn::SetWidth() already calls
wxDataViewCtrl::OnColumnChange() (via UpdateWidth()), so it's
unnecessary to call the latter again immediately after calling the
former. And if the width didn't change, it's not necessary to call it at
all, so in either case the OnColumnChange() call can be just removed.

No real changes.
2020-01-19 03:11:40 +01:00
Tobias Taschner
26c82d43d1 Decode strings returned by ExecuteScript()
ExecuteScript returns strings as fully
quoted JSON strings so they have to be decoded
to a binary string.
2020-01-17 21:11:26 +01:00