Commit Graph

68241 Commits

Author SHA1 Message Date
Paul Cornett
948ddc6e0f Eliminate -Wcast-qual warnings with GCC and Clang
Use const_cast, mutable, and various other changes to avoid -Wcast-qual
2020-02-02 22:50:32 -08:00
Maarten Bent
95d3064a6b Fix reference count in D2D renderer gradient brushes
Closes #18656.
2020-02-02 14:53:16 +01:00
Maarten Bent
8e2f674c0b Remove trailing whitespace 2020-02-02 14:50:57 +01:00
Vadim Zeitlin
6724f8c052 Work around MSVS 2012 bug with handling of nullptr
Avoid error C2180 given by this compiler for if statements with
controlling expression of type nullptr_t.
2020-02-02 01:12:28 +01:00
flederwiesel
0073b54f8e Pass CPPFLAGS to cpp when generating rcdefs.h
Honour user-defined CPPFLAGS when creating rcdefs.h, this notably fixes
generating the file with wrong architecture when cross-compiling from 64
to 32 bits with CPPFLAGS=-m32.

Closes #17844.
2020-02-02 00:13:55 +01:00
Vadim Zeitlin
5b797618a1 Merge WXK_HOME and WXK_END handling in a single case
There are more commonalities than differences between the handling of
these 2 keys and it's better to have a single version of this code.

No changes in behaviour.
2020-02-01 02:23:05 +01:00
Vadim Zeitlin
c7707a16c7 Simplify check for current cell in Home/End handling code
Prefer to just test whether we have it instead of breaking out of the
case if we don't, this is slightly more straightforward.

No real changes.
2020-02-01 01:57:56 +01:00
Ilya Sinitsyn
7fa9416fb4 Test wxGrid cells selection using End key 2020-02-01 01:53:59 +01:00
Ilya Sinitsyn
6e6eb799c8 Implement wxGrid cells selection for Home and End keys
Select cells if Shift is pressed when handling Home and End keys
2020-02-01 01:53:59 +01:00
Ilya Sinitsyn
677b9d21ea Test moving the grid cursor using End key for wxGrid 2020-02-01 01:53:59 +01:00
Ilya Sinitsyn
68ccc77e20 Fix wxGrid Home and End keys handling
Take into account that rows and columns may be hidden and columns also can be
reordered.
2020-02-01 01:53:59 +01:00
Ilya Sinitsyn
bf5be68510 Test wxGrid scrolling when selecting cells. 2020-02-01 01:53:59 +01:00
Ilya Sinitsyn
d455c5b99e Fix making the wrong wxGrid cell visible when selecting
We should make visible the cell of the corner of the current selected block.

Also fix names of the wxGrid::UpdateBlockBeingSelected parameters because
actually passed сщщквы are of any opposite selection block corners.
2020-02-01 01:53:59 +01:00
Vadim Zeitlin
55efc9e607 Allow using wxStrtox() functions with nullptr with MSVS too
Add a unit test checking that it compiles (and works).

This extends the changes of 63b1f00eb8 to
cover MSVS as well.
2020-01-31 17:13:06 +01:00
Vadim Zeitlin
7969f3f81c Define wxHAS_NULLPTR_T if nullptr is supported
This is necessary because MSVS versions as old as 2010 support it, even
if they don't have full C++11 support and so don't define __cplusplus
appropriately.

Extract the existing check for nullptr from wx/strvararg.h to wx/defs.h
in order to allow reusing it.
2020-01-31 17:11:50 +01:00
Vadim Zeitlin
c34a7a2e30 Convert CRT functions test case to use CATCH macros directly
Get rid of legacy CppUnit-compatible macros.

No real changes.
2020-01-31 16:54:06 +01:00
Vadim Zeitlin
37cf80240b Exclude unwanted files in wxMSW tags script
When a new directory is added, it's better to include the tags in it,
even if they're not wanted, than to not do it, when they're.
2020-01-31 16:43:30 +01:00
Vadim Zeitlin
e1fce68be6 Account for checkboxes when autosizing wxListCtrl first column
Without this, the text of the first column was truncated when using
checkboxes.

Closes #18661.
2020-01-31 16:22:49 +01:00
Vadim Zeitlin
1014877302 Slightly reorganize last column width calculation
No real changes, just make it more obvious that we increase the last
column width to the remaining margin if it's smaller than it.
2020-01-31 16:18:41 +01:00
Vadim Zeitlin
01d0deb5bf Get rid of unnecessary variable in wxListCtrl::SetColumnWidth()
No real changes, just remove a variable assigned and used exactly once.
2020-01-31 16:15:13 +01:00
Fulvio Senore
9d470f6433 Fix focus-related problems in wxComboCtrl under MSW
Allow default handling of focus events to take place, this is needed
at least under MSW to avoid confusing the system focus-tracking logic.
2020-01-31 15:41:55 +01:00
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