Commit Graph

68250 Commits

Author SHA1 Message Date
Vadim Zeitlin
46dfc54e8d Generalize changes of the previous commits to wxMac too
Handle "impossible" flag combinations such as wxTB_LEFT|wxTB_RIGHT and
wxTB_TOP|wxTB_BOTTOM that are actually possible under Mac too.
2020-05-06 02:14:02 +02:00
Vadim Zeitlin
101f135445 Fix problem with wxTB_VERTICAL | wxTB_RIGHT too
This is similar to the previous commit, but for the other direction.
2020-05-06 02:09:34 +02:00
PB
33cda12b74 Handle wxToolBars created with wxTB_HORIZONTAL | wxTB_BOTTOM style correctly
wxToolBar created with wxTB_HORIZONTAL | wxTB_BOTTOM had two issues:
(1) There was a toolbar-high gap below the menu bar.
(2) The status bar was not positioned correctly.

Fix both issues by taking into account that wxTB_TOP is an alias for wxTB_HORIZONTAL
and so a wxToolBar can have quite counter-intuitively set both wxTB_TOP and wxTB_BOTTOM.

In such cases it means that the toolbar is horizontal and on the frame bottom,
this needs to be accounted for when computing the origin of the frame client
area as well as the status bar position.

Closes #18760
2020-05-05 20:22:11 +02:00
Vadim Zeitlin
7158c9b5be Use Destroy() rather than delete for dialogs in the sample
Even though it doesn't make any real difference for these dialogs, we
still shouldn't delete top level windows directly and should rather call
Destroy() on them to let them be cleaned up during the next idle time
processing.

See #18747.
2020-05-03 20:21:23 +02:00
Vadim Zeitlin
05bf67df1e Fix parent/child relationship in MSW wxFindReplaceDialog
It's not enough to set the parent pointer in the child, the parent also
needs to be aware of its child, so call AddChild() to do both at once.

This ensures that find dialog with non-null parent is destroyed by it
when it is itself destroyed.

Closes #18747.
2020-05-03 20:17:31 +02:00
Anton Triest
35f1cb417b Fix hit testing in generic wxTreeCtrl in high DPI
Update the code doing hit testing to use FromDIP() too, to be consistent
with the changes of 3a9b5001ce (Fix size of wxGenericTreeCtrl buttons
when using high DPI, 2020-02-23) # Please enter the commit message for
your changes. Lines starting.

See #18674.

Closes #18749.
2020-05-03 19:59:37 +02:00
Vadim Zeitlin
b6c593af45 Fix regression in MSW DoDragDrop() return code
It always returned wxDragNone since the changes of f5548e399e (Fix
problem with dragged icon remaining on screen under MSW 10, 2020-01-11)
which wrongly changed pdwEffect to DROPEFFECT_NONE before doing anything
else, disregarding the fact that it's an in-out parameter and not just
an output one.

Fix this by simply not doing this, just as it hadn't been done before.

See #18499.
2020-05-03 03:13:01 +02:00
Vadim Zeitlin
c88f3a114c Fix warnings in recently added MSWSetTabStops()
gcc complained about converting NULL to long (-Wconversion-null), so use
0 explicitly. Also really pass the pointer to the first element, rather
than iterator, which is not guaranteed to be a pointer.

This amends the changes of d1553c63ed (Improve support for TABs in
wxListBox under MSW, 2020-04-13).

See https://github.com/wxWidgets/wxWidgets/pull/1789
2020-05-03 03:02:20 +02:00
Vadim Zeitlin
43bdadda0d Update PNG library to avoid more -Wundef warnings in MinGW build
Define symbols used in MIPS/PPC code which are also tested using "#if
PNG_FOO > 0" as 0 instead of leaving them undefined.
2020-05-03 02:57:58 +02:00
Vadim Zeitlin
fc08ce94a5 Improve documentation of wxDataViewCtrl item dragging
Try to explain at least a little how is this supposed to work. This is
still insufficient, but better than nothing, which was what we had
before.
2020-05-02 20:12:22 +02:00
Konstantin S. Matveyev
bcddfd6efb Don't start dragging invalid items in generic wxDataViewCtrl
It's not useful to allow dragging from the control area where there are
no items and it resulted in assert failures due to using an invalid row
in wxDataViewDropSource::GiveFeedback(), so simply don't do it at all.

Note that native GTK wxDataViewCtrl implementation doesn't do this
neither, so it also makes the behaviour more consistent.

Closes https://github.com/wxWidgets/wxWidgets/pull/1828
2020-05-02 20:06:49 +02:00
Vadim Zeitlin
fd2aea0352 Log wxEVT_DATAVIEW_ITEM_BEGIN_DRAG in the sample
Show when an attempt to start dragging an item is made, to be able to
compare the behaviour under different platforms easily.
2020-05-02 20:06:48 +02:00
Lauri Nurmi
42af101836 Remove obsolete Darwin-specific code in dynlib.*/dlunix.cpp
We don't have our own dlxxx() implementations under Darwin since 76c5594
(Remove our own dlxxx() functions emulation for OS X <= 10.3.,
2013-10-17).

wxHAVE_DYNLIB_ERROR is reduced to being the same HAVE_DLERROR, so use
the latter one instead.

Closes https://github.com/wxWidgets/wxWidgets/pull/1826
2020-05-02 19:30:28 +02:00
Kvaz1r
67c1c412c6 Implement support for copying wxGrid cells to clipboard
This is useful for read-only grids, in which an editor can't be shown to
copy the value of a cell, and also for copying an entire selection block
and not just a single cell.

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

Closes #13562.
2020-05-02 19:20:48 +02:00
Kvaz1r
63e1697dda Add wxGridBlocks::iterator::operator->()
An iterator should have this operator defined too, and not just
operator*() as it used to.
2020-05-02 18:50:03 +02:00
Vadim Zeitlin
e6ab2391c4 Merge branch 'dvc-virtual-has-value'
Allow overriding wxDataViewModel::HasValue() to specify which cells
should, and should not, show anything.

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

Closes #18724.
2020-05-02 18:22:27 +02:00
Artur Sochirca
d1553c63ed Improve support for TABs in wxListBox under MSW
Always set the LB_USETABSTOPS style flag to achieve behaviour more
compatible with other platforms and expand TABs to align them at tab
stops positioned at every 8 characters.

Also add MSW-specific MSWSetTabStops() method allowing to customize tab
stops.

Update the documentation and the sample to demonstrate using TABs.

Closes https://github.com/wxWidgets/wxWidgets/pull/1789
2020-05-02 18:07:50 +02:00
Vadim Zeitlin
ebe7816516 Finish editing on Enter in cells in the last shown row of wxGrid
Previously, pressing Enter in a cell of a row which wasn't the last one,
but was the last shown one, didn't do anything because we explicitly
checked whether the cell was in the last row and not in the last visible
row, but MoveCursorDown() doesn't move the cursor for the latter, and
not just for the former.

Fix this by avoiding any row checks at all and just calling
MoveCursorDown() in any case and DisableCellEditControl() if it didn't
do anything.

Closes #18754.
2020-05-02 17:45:51 +02:00
Vadim Zeitlin
f5001e728c Rebake with bakefile 0.2.12
No real changes, just synchronize with the bakefile release used now.
2020-05-02 17:02:36 +02:00
Vadim Zeitlin
f83085cff8 Add back the use of INSTALL_SCRIPT correctly
Due to a momentary lapse of reason, the changes of 99cb097f4d (Install
wx-config as a script, not as a binary program, 2018-08-16) were applied
to the generated Makefile.in file and so were promptly lost during the
next rebake.

Reapply them properly now, by modifying the .bkl file from which this
file is generated.

Note that rebaking now requires bakefile v0.2.12, which adds support for
defining INSTALL_SCRIPT.

See #18197.
2020-05-02 15:55:25 +02:00
Vadim Zeitlin
2be019f8f8 Fix integer overflow when reading ZIP central directory
Our code didn't convert 32-bit offset to (possibly 64-bit) m_Offset
correctly in the first place, and didn't check if the offset remained
valid after adjustment.

Fix both problems by using explicit cast and checking for the latter
explicitly.

Credit to OSS-Fuzz: this solves its issue 20527.
2020-05-02 03:38:57 +02:00
Vadim Zeitlin
37485130cc Fix harmless warning about multiline comment in fuzzer runner
Don't embed backslash in multiline C++ comment.
2020-05-02 03:38:28 +02:00
Artur Wieczorek
f938402dd0 Use conditional operator instead of conditional statement 2020-05-01 19:38:52 +02:00
Artur Wieczorek
c0f7275b11 Get rid of redundant return statement 2020-05-01 19:36:09 +02:00
Artur Wieczorek
b9ebffd832 Set also wxPGEditor items while changing wxPGProperty choices
If we replace current set of choices when editor is active
we need also replace editor items.

Closes #18741.
2020-05-01 19:35:29 +02:00
Artur Wieczorek
8a9e5e5ac7 Implement method to set items of wxPGChoiceEditor
In addition to the current methods to add/delete one item to the control
we would need a method to replace all existing control items with new ones
at once.
2020-05-01 17:57:46 +02:00
Paul Cornett
9d4bb47050 Don't compile Cairo dynamic linking code with GTK
It's useless as Cairo is always linked to any program using GTK
2020-04-30 09:11:37 -07:00
Paul Cornett
861cc376d6 Avoid -Wempty-body warning with non-debug build 2020-04-30 09:01:09 -07:00
Paul Cornett
af5950c108 Avoid Gtk-CRITICAL with GTK3 when calling SetFont() before Create() 2020-04-29 07:35:44 -07:00
Dummy
b3730a59c6 Document default value for wxDialog::Show() parameter correctly
It's "true", not "1".

See #18743.
2020-04-29 15:46:47 +02:00
Dummy
bbc88cedf1 Fix wrong documentation of EVT_CLOSE for the dialogs
Clicking OK/Cancel buttons closes the dialog (by default), but doesn't
generate wxEVT_CLOSE event, so don't write that it does.

Closes #18743.
2020-04-28 18:52:49 +02:00
Vadim Zeitlin
7a56a200bf Remove the mention of update_release_info.rb from release HOWTO
This is now done automatically in the GitHub action of wxWidgets/website
repository.

Do mention that rebuilding the web site requires the release to be
available.
2020-04-28 00:53:06 +02:00
Vadim Zeitlin
a9fda9bfa8 Recognize wxFIXED_MINSIZE in sizer flags in the XRC schema
This seems to have been an accidental omission.
2020-04-26 23:37:02 +02:00
Stefan Csomor
7c61841d27 adding implementation for GetMatchingPair on macOS, streamlining wxDataObject
When adding the GetMatchinPair implementation, some clean-ups were done, for further details please see #1821
2020-04-26 17:50:33 +02:00
Vadim Zeitlin
a98410504b Document updating docs.wxwidgets.org for the releases
[skip ci]

Closes https://github.com/wxWidgets/wxWidgets/pull/1823
2020-04-26 16:33:51 +02:00
Stefan Csomor
dc93ff1967 correcting include style 2020-04-26 15:55:51 +02:00
Stefan Csomor
a235f8e04c bracket code not working on ios 2020-04-26 11:54:54 +02:00
Stefan Csomor
68b22e65b8 adding bitmap button implementation to ios 2020-04-26 11:54:04 +02:00
Paul Cornett
9f3ad89ba9 Update some documentation to reflect change of default GTK version for configure
Make some other feeble attempts to update these very outdated files, including
dropping '+' from GTK, and most references to GTK 1.
2020-04-25 08:39:42 -07:00
Vadim Zeitlin
c385676610 Prefer using https://www.wxwidgets.org/downloads/ download link
This is more user-friendly than GitHub links with their tons of files.

Also use the recently added #vX.Y.Z_msw anchor to link directly to MSW
binaries downloads from the corresponding file.

Closes https://github.com/wxWidgets/wxWidgets/pull/1820
2020-04-24 23:02:16 +02:00
Vadim Zeitlin
dc34600c0c Fix built-in PNG library build with MSVC 9 and older
Upgrade the submodule to a version which doesn't try to use SSE2 with
this old compiler, as it doesn't support the required intrinsics.

See https://github.com/wxWidgets/libpng/pull/4
2020-04-24 00:42:41 +02:00
Vadim Zeitlin
4ee7202121 Merge branch 'upgrade-travis-platforms'
Use more recent Linux and macOS versions for Travis CI builds.

See https://github.com/wxWidgets/wxWidgets/pull/1818
2020-04-24 00:39:25 +02:00
Paul Cornett
9f9bb66d18 Fix for GTK2 wxSpinCtrl SetIncrement() not immediately updating increment
See #18735
2020-04-23 08:55:46 -07:00
Vadim Zeitlin
0397da2a8f Use ld --no-as-needed in Travis Ubuntu 18.04 wxGTK build
This works around a problem in our build system which doesn't set rpath
correctly when linking our own libraries, which means that "qa" library,
for example, doesn't record the path to its "xml" library dependency.

We already worked around this by linking any program using "qa" with
"xml" too, however this doesn't do anything if "--as-needed" flag is in
effect, as is the case by default under Ubuntu 18.04, so make our
workaround work by forcefully disabling this flag.

Real solution would be to use -Wl,-rpath correctly and then stop linking
with "xml" library unnecessarily in e.g. test_gui bakefile.
2020-04-23 02:59:45 +02:00
Vadim Zeitlin
f1ee627736 Update Travis testing script to work for non-GUI builds too
Skip parts that don't work in this case.
2020-04-22 21:00:28 +02:00
Vadim Zeitlin
7cfe4ee9f2 Disable GUI parts build for PPC and S/390 Travis platforms
People are unlikely to use wxGTK on those anyhow, and it takes an
awfully long time to build, especially on PPC.
2020-04-22 18:26:02 +02:00
Vadim Zeitlin
30241e18ba Fix configure success test one more time
Quotes are important.
2020-04-22 18:25:48 +02:00
Vadim Zeitlin
ea11be554c Install libpango1.0-dev for wxX11 build on Travis
Hopefully this is what explains pangoxft pkg-config check failure.
2020-04-22 17:56:45 +02:00
Vadim Zeitlin
cc86204c98 Change wxOSX CMake build name to include "CMake" 2020-04-22 17:54:01 +02:00
Vadim Zeitlin
a22b9b283d Really fix configure exit code test
Don't compare undefined variable with 0, this is not going to work.
2020-04-22 17:51:55 +02:00