Commit graph

73206 commits

Author SHA1 Message Date
Vadim Zeitlin
2d939a3665 Add wxDEPRECATED_EXPORT_CORE() macro for wxTransformMatrix
wxDEPRECATED_MSG() and WXDLLIMPEXP_CORE can't be used together in the
same declaration when the former uses the standard attribute ([[...]])
and the latter uses a legacy one (__attribute__((....))), at least not
with gcc 12.

Work around this problem by defining a special new macro that combines
both attributes in a working way.

This is rather ugly, as it would seem to be better to just always define
WXDLLIMPEXP_CORE using the standard attribute, but unfortunately this
doesn't work as the standard attribute must be placed before the
function and variable declarations, while we currently use our DLL
export macros in the middle of the declaration. Maybe we can change all
the declarations doing this later, but for now this is the simplest
solution to the immediate problem.

See #22790.
2022-09-18 19:53:39 +02:00
Lauri Nurmi
969b1fad4c Fix more double negatives used with 'neither'
In many cases it should be 'either'.

No changes to actual code.

Complements #22723, which focused on API docs and comments in C++ code.

Co-authored-by: Ian McInerney <ian.s.mcinerney@ieee.org>

See #22798.
2022-09-18 18:02:07 +02:00
Maarten Bent
49b62441b5 CMake: Restore wx-config variables
This was erroneously removed in ad75a77bc6 (CMake: Cleanup the
wx_configure_script macro, 2021-10-27).

Fixes #22806.

See #22809.
2022-09-18 17:46:49 +02:00
Vadim Zeitlin
dd50c77a88 Update the instructions for creating releases on GitHub
Explain how to use the new workflow to automate even more parts of the
release process.
2022-09-15 18:45:06 +02:00
Vadim Zeitlin
391555d341 Fix data race when using wxTheApp::m_handlersWithPendingEvents
Appending to the vector from another thread could reallocate it, making
access to its first element from the main thread invalid and resulting
in probably very hard to diagnose crashes.

Fix this by storing the handler in a local variable before releasing the
critical section protecting the vector. This still relies on the handler
not being deleted, but this was the case before too and shouldn't happen
and, most importantly, there doesn't seem to be anything we can do about
it if it does.

Thanks TSAN for the warning.
2022-09-15 00:05:07 +02:00
Paul Cornett
351b76ace0 Fix including "wx/sckaddr.h" as first header, see #22791 2022-09-11 08:00:31 -07:00
Vadim Zeitlin
d8556bf3ee Merge branch 'webview_native_config' of https://github.com/TcT2k/wxWidgets
Add wxWebView::GetNativeConfiguration().

See #22781.
2022-09-10 13:40:07 +02:00
Tobias Taschner
6780383163
Fix wxWebView documentation grouping
Set/GetUserAgent() where grouped under "Dev Tools"
2022-09-09 18:07:00 +02:00
Tobias Taschner
4953cf65b4
Improve wxJSScriptWrapper performance
The previous implementation was very inefficent on larger scripts
2022-09-09 18:01:44 +02:00
Tobias Taschner
40ff38b63b
Add wxWebView::GetNativeConfiguration()
New method to return the pointer to the native configuration used during
the creation of the web view

This allows for customization that would not be available to the
application otherwise.
2022-09-09 18:00:04 +02:00
PB
e1a56e21bb Remove v2.8 compatibility functions from wxVScrolledWindow docs
Section "wxWidgets 2.8 Compatibility Functions" does not apply anymore,
these deprecated methods were removed in wxWidgets 3.3, therefore the
whole section must be removed.

Closes #22783.
2022-09-09 17:24:36 +02:00
PB
17371d911d Improve wxBitmapBundle documentation, notably mention SVG support
Add an SVG and a wxBitmapBundleImpl to the list of methods that can be
used when creating a wxBitmapBundle.

Remove a generic sentence promising adding other methods of creating
bundles in the future.

Closes #22774.
2022-09-05 20:35:43 +02:00
Paul Cornett
52eedc171c Restore check for radius <= 0 when drawing ellipse with Cairo
This was lost in
a5d4a99bb0 (Use native methods to draw some geometric figures using Cairo renderer, 2016-05-31)
2022-09-05 09:11:20 -07:00
Vadim Zeitlin
31720e1ee1 Fix bug when creating a new release in our gh-release action fork
The previous bug fix fixes updating an existing release, but broke
creating the new ones, which wasn't ideal.
2022-09-04 17:48:00 +02:00
Vadim Zeitlin
12155bff3d Merge branch 'release-workflow'
More fixes for the release workflow.
2022-09-04 16:41:38 +02:00
Vadim Zeitlin
4432435754 Fix updating draft body with MSW files checksums
This unfortunately requires using our own fork of the action as this is
broken in the upstream version.
2022-09-04 16:41:18 +02:00
Vadim Zeitlin
37df53f969 Also show Unix archives checksums in the workflow log
This can be useful if we need to double check that the checksums are
correct and is also consistent with the MSW archives.
2022-09-04 16:41:18 +02:00
Vadim Zeitlin
0f07589008 Fix wrong use of slashes in a cmd script
Use backslashes instead.
2022-09-04 16:41:18 +02:00
Vadim Zeitlin
d5a9d99781 Add a GitHub Actions workflow for creating releases
This takes care of the easy to automate steps.
2022-09-04 03:25:20 +02:00
Paul Cornett
955f11504b Make wxWindow::GetTextExtent() result match wxDC::GetTextExtent() on OSX 2022-09-03 08:20:38 -07:00
Vadim Zeitlin
d6c9040c4a Allow specifying release date in the pre-release script
This is useful when preparing a release in advance.
2022-09-03 14:50:04 +02:00
Maarten Bent
c6c6dacd64 Change wxImage::ResampleBox() to avoid MSVS 2022 optimizer bug
Calculate averaged_pixels directly instead of doing it in a loop as we
somehow end up with a value of 0 for it when using MSVS 2022 optimized
64-bit build.

See #22761.
2022-09-02 23:00:23 +02:00
Vadim Zeitlin
ab2dd24976 Add wxGrid::Enable{Row,Col}Resize()
These functions are needed to allow resizing the rows/columns whose size
was fixed by Disable{Row,Col}Resize() as otherwise the effect of a call
to the latter function can't be undone at all.
2022-09-02 20:52:20 +01:00
Vadim Zeitlin
e2a6eac6e8 Merge branch 'grid-freeze-no-size-check'
Fix checks in wxGrid::FreezeTo(): do not silently do nothing if the grid
is too small or all rows/columns are frozen. Do assert if the parameters
are out of range.

See #22766.
2022-09-02 19:18:40 +02:00
Night-Wisp
e7521d7b2c Fix two minor UI problems in the Bombs demo
Error 1: When enabling/disabling easy corner, the enable/disable text
was mixed up. This resulted in being asked to confirm disabling easy
corner, when it was being enabled, and vice versa.

Error 2: When choosing not to switch easy corner, the checkmark in the
menu showing it's state still swapped.

Fix 1: Swap the text for enable/disable in the confirm easy mode toggle
dialog box.

Fix 2: Call GetMenuBar()->Check(bombsID_EASYCORNER, m_easyCorner);
(Check always returns void, and GetMenuBar is only called from the
MenuBar, after it's been set up) to set the checkmark's state, when
needed.

Closes #22764.
2022-09-02 19:13:52 +02:00
Vadim Zeitlin
d9a78be16c Merge branch 'cmake-gtk-printing' of https://github.com/MaartenBent/wxWidgets
CMake: Add GTK Printing support.

And show the extra toolkit options in the CMake summary, fix using
libnotify and gnomevfs with gtk3 and fix some unused parameter warnings
when using gtk2 or gtk3 on Windows.

See #22762.
2022-09-02 19:12:46 +02:00
Alex
db3feb65c6 Use read-only permissions for CMake CI workflow too
This wasn't done in 64add326f6 (Restrict job permissions in GitHub
actions workflows, 2022-06-27) for some reason.

See #22574.

Closes #22769.

Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-09-02 19:11:11 +02:00
Jouk
966ebcc93d Do not call GTKAllowDiagnosticsControl() for gtk<2.0 2022-09-02 12:28:17 +02:00
Bryan Petty
6a10064d24
Remove dark-mode color invert from screenshots in manual 2022-09-01 18:49:38 -06:00
Vadim Zeitlin
3d223ee776 Assert if the arguments of FreezeTo() are really out of range
This shouldn't be just silently ignored as it indicates a programming
error, unlike the other conditions being tested here.
2022-09-02 00:05:25 +01:00
Vadim Zeitlin
d914a6ca22 Fix check for parameter validity in wxGrid::FreezeTo()
The number of rows or columns to freeze may be equal to the total number
of rows or columns, it just can't be strictly greater than it.

This is especially important when trying to thaw a grid which doesn't
have any rows, for example: before this change FreezeTo() would simply
return immediately, leaving the number of frozen columns unchanged and
quite possibly invalid (i.e. really out of range). Fix this by ensuring
that we reset it correctly now.

Also fix the types of the parameters in the documentation.
2022-09-02 00:02:58 +01:00
Vadim Zeitlin
6f00c734cd Remove useless check for grid size in wxGrid::FreezeTo()
This resulted in silently doing nothing when calling FreezeTo() on a
grid which hadn't been resized to its full size yet, which seems wrong
and not useful at all, so simply remove this check and freeze the
requested rows/columns in any case -- it's the user responsibility to
make the grid sufficiently big to allow the user to see the non-frozen
parts.
2022-09-01 23:58:24 +01:00
Maarten Bent
789d6d70d4
Fix unused parameter warnings in Windows GTK build 2022-08-31 00:22:37 +02:00
Maarten Bent
7f8cca9245
CMake: Add GTK Printing support
See #22745
2022-08-31 00:22:36 +02:00
Maarten Bent
43aae40a11
CMake: Enable libnotify and gnomevfs for gtk3
Unlike configure, WXGTK2 is not defined internally when WXGTK3 is used.
2022-08-30 23:10:14 +02:00
Maarten Bent
6cb97e2208
CMake: show extra toolkit options in summary
Just like configure does.
2022-08-30 23:07:05 +02:00
Vadim Zeitlin
2545cf5b8d Merge branch 'radiobox-without-items'
Handle wxRadiobox without items correctly in wxOSX.

See #22755.
2022-08-30 12:20:54 +02:00
Vadim Zeitlin
ef6ee28876 Merge branch 'gtk-log'
Fix crash when using wxNotebook in applications calling
g_log_set_writer_func() with glib 2.73+

See #22753.
2022-08-30 12:19:31 +02:00
Vadim Zeitlin
b4de847d7b Merge branch 'grid-process-table-message'
Improvement to wxGrid::ProcessTableMessage().

See #22749.
2022-08-30 12:14:22 +02:00
Vadim Zeitlin
de345d33b2 Merge branch 'docview-onclosedoc'
Improvements to closing wxDocument: don't call OnCloseDocument() twice.

See #22627.
2022-08-30 11:12:58 +01:00
Vadim Zeitlin
efcb15f2bf Fix images with alpha in wxMSW wxImageList without mask support
This was broken by the pre-3.2 changes to wxImageList which resulted in
not undoing alpha pre-multiplication when adding such images to the
image list.

In particular, this broke the appearance of disabled button images in
wxToolBar, as it uses wxImageList for storing them.

See #22754, #22756.
2022-08-30 11:11:39 +01:00
Vadim Zeitlin
b0c417db36 Fix crash when using a wxRadioBox without items in wxOSX
wxRadioBox::m_radioButtonCycle is never null -- except when it is, when
there are no items at all in the radio box. Handle this case without
crashing too by checking for the pointer being valid before using it.

Also add a unit test checking that this works correctly.

See #22751.
2022-08-29 19:06:43 +02:00
Vadim Zeitlin
5a6f2796d5 Use CATCH macros instead of CPPUNIT_ASSERT() in wxRadioBox test
No real changes, just get rid of the last vestiges of CppUnit in this
file.
2022-08-29 18:34:16 +02:00
Vadim Zeitlin
7c2031620d Remove CppUnit boilerplate from wxRadioBox unit test
Define a simple fixture instead of inheriting from CppUnit::TestCase.

No real changes, just make the code shorter, less redundant and make it
simpler to run individual tests.
2022-08-29 18:32:52 +02:00
Vadim Zeitlin
8af645ed22 Fix crash when using wxNotebook with glib 2.73 or later
Make GTK notebook log suppression opt-in to avoid a fatal error when the
application calls g_log_set_writer_func() itself, as doing it more than
once immediately kills the application with glib 2.73 and there is no
way to check if it had been already done or not (you have to admire the
purity of the API design here).

This is unfortunate as 99% of the wxWidgets applications that do _not_
call g_log_set_writer_func() would now show the spurious diagnostics by
default again, but preferable to making the remaining 1% crash, and
there doesn't seem to be any other solution.

Call the new GTKAllowDiagnosticsControl() function in the notebook
sample to at least still avoid getting the spurious diagnostic messages
described in #22176 there.

See #22717,.
2022-08-29 18:10:15 +02:00
Vadim Zeitlin
82cb8aa859 Fix harmless gcc 12 warning about adding enums
Add a cast to avoid -Wdeprecated-enum-enum-conversion from gcc 12.

No real changes.
2022-08-29 15:37:13 +02:00
Vadim Zeitlin
88c6f85e51 Fix typo in GTKSuppressDiagnostics() comment
No real changes.
2022-08-29 15:15:43 +02:00
Kenneth Porter
974a7658da Add wxColourDatabase::GetAllNames()
Return all known colour names from this function and show them in the
drawing sample.

Closes #9264.

Closes #22724.
2022-08-29 00:44:49 +02:00
Maarten Bent
9b0f715f55 Use built-in NanoSVG in CMake build by default
Since we do not provide a FindNanoSVG module, we should use the built-in
version of the library by default. And prevent warnings about not being
able to find the package configuration file.

See #22748.
2022-08-29 00:44:28 +02:00
Maarten Bent
929f8b00f0 Fix appearance of STC call tips in high DPI
Use correct DPI scale for the bitmap used as the backing store.

See #22734.

Closes #22747.
2022-08-28 22:26:50 +02:00