Commit Graph

69474 Commits

Author SHA1 Message Date
PB
d4b84dbb35 Update as requested in review 2020-12-08 17:24:53 +01:00
PB
415f16b22e Update Platform Details overview
Remove information that is no longer relevant or important.
Replace "http" with "https" everywhere.
2020-12-08 15:57:54 +01:00
Vadim Zeitlin
b2878e992c Merge branch 'gtk-docs'
Update wxGTK README and install instructions for 21st century.

See https://github.com/wxWidgets/wxWidgets/pull/2132
2020-12-07 14:08:00 +01:00
Vadim Zeitlin
65955a1d91 Merge branch 'dvc-kbd-shortcuts'
Add wxDVC::ExpandChildren() and handle standard keyboard shortcuts in
the generic version.

See https://github.com/wxWidgets/wxWidgets/pull/2135
2020-12-07 14:07:20 +01:00
Vadim Zeitlin
63b1f17703 Make it possible to use controls inside wxComboPopup again
This should have been done together with the changes of 41410610ef
(Don't force wxPU_CONTAINS_CONTROLS on wxPopupTransientWindow,
2020-07-10) as without this style controls inside wxComboPopup couldn't
accept focus any more, which broke the previously working code.
2020-12-07 14:06:23 +01:00
Artur Wieczorek
aa641b9aae Allow to move wxPGMultiButton to -1 coordinate
Negative coordinates of wxPGMultiButton window are legitimate here so we need to process -1 coordinate value verbatim.

Closes #18971.
2020-12-06 18:00:00 +01:00
Stefan Csomor
4aafab47e7 Simplify SetFont() in wxOSX implementations
It doesn't need to take the colour and other parameters unused any more.

Closes https://github.com/wxWidgets/wxWidgets/pull/2103
2020-12-06 00:33:30 +01:00
Vadim Zeitlin
3b92572eb6 Focus the data view control on the sample startup
Previously focus stayed on the log text control, which was useless and
inconvenient.
2020-12-05 16:37:13 +01:00
Vadim Zeitlin
a53e69beb0 Allow expanding/collapsing items from keyboard in generic wxDVC
Add the usual handlers for '-', '+' and '*' keys. The last one is
especially convenient, as it does something that couldn't be easily done
at all interactively before.
2020-12-05 16:37:13 +01:00
Vadim Zeitlin
d47fa718cd Add wxDataViewCtrl::ExpandChildren()
This convenient method allows to expand all children of the item
recursively.

This is directly supported by both native implementations, so it makes
sense to have this in wxDataViewCtrl itself, even if it could be also
(less efficiently) implemented in the user code.
2020-12-05 16:37:13 +01:00
Vadim Zeitlin
faffc5fe0a Only invalidate row height cache when a row is really expanded
It's wasteful to do it if it's already expanded or won't be expanded
because the EXPANDING event is vetoed.
2020-12-05 16:36:12 +01:00
Vadim Zeitlin
1e28312035 Override DoExpand() in wxQt wxDataViewCtrl stub
This code doesn't work (and probably doesn't compile) anyhow, but at
least try to do the right thing in it and override DoExpand() instead of
adding a virtual Expand() hiding the non-virtual version in the base
class.
2020-12-05 13:52:48 +01:00
Vadim Zeitlin
dbc16e1633 Also document wxMediaCtrl and wxWebView dependencies
These are arguably important enough to be mentioned too.
2020-12-04 20:17:38 +01:00
Vadim Zeitlin
7e75168939 Document OpenGL-related configure options in wxGTK docs
They're sufficiently important and not obvious to be mentioned.
2020-12-04 20:17:38 +01:00
Vadim Zeitlin
bd1c66b245 Don't use hard TABs in the makefile snippet in the docs
This doesn't pass the indentation style check and TABs are likely to get
lost when copying/pasting anyhow, so remove them and add an explicit
note about TABs being needed here instead.
2020-12-04 20:17:38 +01:00
Vadim Zeitlin
bdbf00090e Update and simplify wxGTK installation instructions too
Remove obsolete information, add more useful configure options and a
link to CMake.
2020-12-04 20:17:29 +01:00
Vadim Zeitlin
859193fb65 Merge branch 'connect-overloaded-c++17'
Make Connect() work with overloaded event handlers in C++17.

See https://github.com/wxWidgets/wxWidgets/pull/2126
2020-12-04 20:02:46 +01:00
Vadim Zeitlin
dc33f27e10 Merge branch 'printf-out-of-mem'
Fix crash in wxString::PrintfV() due to integer overflow/running out of
memory.

See https://github.com/wxWidgets/wxWidgets/pull/2131
2020-12-04 20:01:30 +01:00
Vadim Zeitlin
e98ac38dcb Fix wxStatusBar::SetMinHeight() in wxMSW
This was broken, possibly by 25c9b032a8 (Don't call CacheBestSize() from
DoGetBestSize() implementations, 2016-04-03), as it didn't change the
min size of the status bar and so it was resized to it when it was
managed by wxFrame.

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

Closes #18996.
2020-12-04 20:00:02 +01:00
Vadim Zeitlin
84e6e5a029 Add another commit to ignore when doing git-blame
This one contains whitespace changes only.
2020-12-04 20:00:00 +01:00
Vadim Zeitlin
a7dfedf602 Skip URL test if it fails when running on AppVeyor
Failing it is not useful, this results in the CI failure when in 99% of
the cases the transient network problem which resulted in this test
failure has nothing to do with the changes being tested.
2020-12-04 19:29:59 +01:00
Paul Cornett
24a982e6e2 Fix wxGraphicsContext size with Cairo when created from wxImage. See #18995 2020-12-01 19:32:53 -08:00
Vadim Zeitlin
344cc940a0 Impose upper limit on memory allocation in wxString::PrintfV()
Don't loop indefinitely until we run out of memory, possibly after
wrapping around INT_MAX, but impose an arbitrary limit of 128MiB for the
max allocation done by wxString::PrintfV() when the provided format
string or one of the arguments are invalid.

This notably fixes a crash when trying to use "%c" to output an invalid
Unicode character.

Also improve comment explaining DoStringPrintfV() logic and change the
size type to size_t from int.

Co-Authored-By: Arrigo Marchiori <ardovm@yahoo.it>
2020-12-01 21:53:55 +01:00
Vadim Zeitlin
8fb4ab99f1 Always return -1 but set errno in our wxVsnprintf() on error
This makes it more compatible with the standard behaviour of vswprintf()
and allows to use the same logic in the builds using our version of this
function and the normal ones in DoStringPrintfV(), simplifying its
(already rather hairy) logic.

Update the tests to not require any particular return value in case of
buffer overflow, as this differs between Unicode and non-Unicode builds.
When we finally drop the latter, we should just check that it always
returns -1 in this case.

Note that ideal would be to return the actually needed size of the
buffer in case of the error due to buffer being too small, but this
isn't that simple to do and it's probably not worth spending time on
improving this code as long as we still need to use the buffer doubling
strategy in DoStringPrintfV() when using the standard vswprintf().
2020-12-01 21:53:55 +01:00
Marcos
cda21c8ddc Fix a cosmetic bug in ExtendRulesAndAlternateColour() code
Ensure that vertical rules extend to the bottom of the window on the
non-first page of the control too.

This was probably broken in 5ae2a8ebb8 (Simplify API for extending
wxListCtrl background display, 2020-11-09).

Closes https://github.com/wxWidgets/wxWidgets/pull/2130
2020-12-01 01:32:26 +01:00
Vadim Zeitlin
7a2786bf11 Get rid of CppUnit macros in wxVsnprintf() tests too
Use CATCH macros directly.

Also remove some unnecessary casts and wxT().
2020-12-01 00:53:07 +01:00
Vadim Zeitlin
388dfb9fad Replace various CMPn() macros with a single CMP() vararg one
Reduce duplication and simplify the test code by using the same macro
for any number of printf() arguments.

Note that this relies on "##__VA_ARGS__" gcc extension to work even for
CMP0(), i.e. when there are no parameters at all. If this ever becomes a
problem, we can always reintroduce a separate CMP_NO_ARGS() macro.
2020-12-01 00:51:35 +01:00
Vadim Zeitlin
9c586177da Update and condense wxGTK README
Remove obsolete information and parts already documented elsewhere.

Also remove the part about wxWidgets crashing your harddisk or
destroying your monitor because I'm a killjoy.
2020-12-01 00:22:58 +01:00
Vadim Zeitlin
e4f4311caa Remove outdated wxGTK overview
This doesn't seem to contain any still relevant information not already
mentioned somewhere else.
2020-11-30 22:37:22 +01:00
Vadim Zeitlin
a5b93ef914 Remove controls implemented natively from "non-native" list
Both GtkSearchEntry and GtkCalendar are used in wxGTK whenever possible.
2020-11-30 22:34:37 +01:00
Stefan Csomor
fab9a67d23 Guard against NULL Sockets
I’ve not been able to reproduce it always, but when using wxHTTP the internal socket was sometimes already closed. So just guard against crashes.
2020-11-30 18:49:38 +01:00
Vadim Zeitlin
db9727ac26 Remove CppUnit test case boilerplate from wxVsnprintf() unit test
Use separate CATCH test cases for different tests.

No real changes, just update and simplify.
2020-11-30 17:17:20 +01:00
Vadim Zeitlin
f4db86cc77 Fix signed/unsigned comparison warnings in wxVsnprintf test
These warnings only appeared in build configurations using our own
implementation, i.e. not in the default build.
2020-11-30 17:10:05 +01:00
Stefan Csomor
14fb1c5fe1 wrapping private types properly in UTI 2020-11-29 20:42:26 +01:00
Maarten Bent
bdc18f68b6 Update wxHtmlWindow on DPI change
This is not ideal, as resetting the page contents loses the current
selection and redoes a lot of work that could be avoided, but it's
(much) better than nothing, as it fixes the window appearance after e.g.
moving it to another monitor.

Closes #18564.
2020-11-28 16:56:22 +01:00
Maarten Bent
39ca664053 Improve handling of non default DPI in wxHtmlWindow deawing code
This replaces the fix of f4dcac9f44 (Return wxFont adjusted to DPI in
wxHtmlWinParser::CreateCurrentFont(), 2020-11-25) adjusting the font
explicitly under MSW with a better fix, associating the correct window
(and hence DPI) with the device context used in OnPaint().

See #18564.
2020-11-28 16:56:10 +01:00
Vadim Zeitlin
ef9161861d Fix invalid memory read in wxMSW wxTextCtrl::GetLineText()
Don't read before the start of the buffer when getting the text of an
empty line, this was (correctly) flagged as heap error by address
sanitizer.
2020-11-28 16:35:03 +01:00
Vadim Zeitlin
7dbcbad7c6 Merge branch 'misc-dpi-bugs' of https://github.com/MaartenBent/wxWidgets
Miscellaneous DPI-related bug fixes.

See https://github.com/wxWidgets/wxWidgets/pull/2128
2020-11-27 15:14:06 +01:00
Maarten Bent
f4221b6df5 Improve GetSizeFromText in wxComboCtrl
Also take default text indent into account, and use the actual button area width.

Closes #18930.
2020-11-26 20:52:49 +01:00
Maarten Bent
f4dcac9f44 Return wxFont adjusted to DPI in wxHtmlWinParser::CreateCurrentFont()
See #18564.
2020-11-26 20:52:49 +01:00
Maarten Bent
78decce3d8 Don't change sizer dimensions on DPI change
Closes #18969.
2020-11-25 23:52:32 +01:00
Paul Cornett
32c8b4dc8c Fix wxRibbonToolBar layout
Broken by 1e753f97ba (Remove initializations which are the default value, 2019-02-25)
See #18985
2020-11-24 08:47:42 -08:00
Joao Matos
feebe8e763 Fix handling of GTK cursor events to set window event object and id. 2020-11-23 22:47:15 -08:00
Vadim Zeitlin
433480f7d0 Merge branch 'bitness' of https://github.com/lanurmi/wxWidgets
Replace "architecture" with "bitness" for the value indicating whether
the architecture uses 32 or 64 bits.

See https://github.com/wxWidgets/wxWidgets/pull/2122
2020-11-22 00:35:29 +01:00
Vadim Zeitlin
f48099e00a Make Connect() work with overloaded event handlers in C++17
This used to work previously but got broken when using C++17 by
c3810da549 (Allow using noexcept methods with event tables macros,
2020-04-09), as cast added to deal with noexcept handlers relied on
argument type deduction which can't be done for overloaded functions.

Fix this by extracting the event argument type from the function pointer
type and specifying it explicitly, while still letting the compiler
deduce the class.

Add a test case checking that using overloaded event handlers compiles.

See #18721.

Closes #18896.
2020-11-21 20:52:13 +01:00
Lauri Nurmi
b74702543b Rename wxPlatformInfo::*Arch* to *Bitness*, deprecate old names 2020-11-21 19:16:21 +02:00
Bill Su
47078992c6 Fix handling of mask in wxBitmap::ConvertToImage()
Handling mask when converting wxBitmap to wxImage was accidentally
broken by 7e9afad53a (Add real support for monochrome bitmaps to wxMSW,
2020-10-19). Fix this now and reuse the new wxMonoPixelData to make the
code simpler and more readable.

This commit is best viewed ignoring whitespace-only changes, as it
unindents a large block of code.

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

Closes #18974, #18975.
2020-11-21 18:14:02 +01:00
Lauri Nurmi
68ea3c59f1 Explain in wxPlatformInfo docs that it means bitness when it says architecture
In the context of wxPlatformInfo, 'architecture' means either '32 bit' or
'64 bit'. Anywhere outside the context of wxPlatformInfo, this concept is
known as 'bitness'.

For the rest of the world, 'architecture' generally refers to the CPU
instruction set architecture, i.e. something like x86, x86_64, arm64, whereas
'operating system architecture' refers to the design of separating kernel
space, user space, etc.
2020-11-21 18:17:18 +02:00
Paul Cornett
b27aefacef Fix wxSplitterWindow sash appearance with some GTK themes
See #18981
2020-11-21 08:09:23 -08:00
Paul Cornett
dd864cffe0 Fix border drawing glitch in wxGrid column header
See #18980
2020-11-20 21:46:09 -08:00