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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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>
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.
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.
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.
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.
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.
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,.
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.