This didn't work because the result of the first call to GetPrinter(),
done only to retrieve the buffer size, doesn't matter and should _not_
be checked as otherwise we're never going to succeed retrieving anything
at all.
Closes#23068.
Avoid complicated preprocessor manipulations not needed any more since
the simplifications of 10d2354125 (Merge branch
'simplify-application-manifests', 2021-12-18).
Fixes#23057.
Closes#23065.
Implement wxListBox functions related to layout and hit testing.
Fix wxRearrange{List,Ctrl,Dialog} that were previously totally broken
under wxQt.
This also makes RearrangeListTestCase test pass.
Closes#23063.
Avoid using glibc specific defines when using musl, which does not
provide glibc-only enum members such as _NL_ADDRESS_LANG_NAME.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Closes#23050.
This re-enables the use of $host-pkg-config after it was disabled again
by d6ddfe87e1 (Disable build system pkg-config when cross-compiling to
non-Linux, 2022-11-30).
Closes#23037.
The edge backend has various accelerator keys enable per default.
This include Ctrl-P, Ctrl-F, F5 and others. In many uses of webview
this might not be desirable and can be disabled.
This is currently only implemented for the Edge backend.
Raises required WebView2 SDK version from 1.0.705.50 to 1.0.864.35
Initialize member variables in the order they were declared,
use "using" to prevent hiding base class overload, and
add a missing "override" specifier.
It needs to be stated clearly that the limit applies only to the text
the user can enter in the editor associated with property.
This constraint does not apply to the length of text represenations
of values set programmatically.
Corresponding test were added.
Destroying clipping region is since 106b850593
("Fix wxCairoContext::ResetClip() for wxGTK", 2022-10-28) fully handled in
parent wxGCDCImpl::DestroyClippingRegion() calling wxCairoContext::ResetClip()
(including re-establishing clip for paint update area) so there is no need
to implement overriding method in wxPaintDCImpl.
Closes#23046.
Give more details in case of failure by using INFO() and use simple
CHECK()s instead of ugly WX_ASSERT_EQUAL_MESSAGE as they will show the
failing test anyhow.
No real changes.
This vararg function accepts any kind of values, without any checks, but
actually needs double for TIFFTAG_[XY]RESOLUTION and not int that we
passed to it, and which could result in the double values actually
having a NaN value of the word on the stack before the int happened to
have just the wrong value and which, in turn, resulted in a failure to
save the TIFF file later as libtiff checks that the values are valid,
i.e. positive and not-NaN. Note that we really need to pass the values
as doubles, even if they're stored as floats internally and returned as
such by TIFFGetField().
Also fix the types for all the other calls of this function, even if
this hasn't been observed to result in any problems so far.
Closes#23048.
Use a helper function to both make it shorter and provide more
information in case of a check failure: now the output will include the
name of the file, comparing with which failed, allowing to immediately
see which test failed.
Amazingly, it seems that the latest gcc 12-based MinGW miscompiles
something in TIFF code _without_ optimizations as the SaveTIFF() test
fails when compiled with -O0 but works with -O2, so try enabling the
optimizations for this test.
It also makes more sense to run tests against the production/release
versions of the library anyhow, we only used --disable-optimise to save
on build time, but perhaps this is not as critical any longer.
Using this class is simpler, more efficient and MT-safe, which is
important because wxZipInputStream can be used from a background thread
(e.g. to decompress a file downloaded from the network etc).
Document that wxLog::SetLogLevel() is not MT-safe and that wxLogNull
should be used instead of calling it to temporarily change the log level
from the other threads.
wxDataViewCtrl doesn't resort itself automatically when
wxDataViewColumn::SetSortOrder() is called and changing this might not
be necessarily a good idea, so just resort it explicitly in
wxTreeListCtrl itself -- because it should definitely be updated when
SetSortOrder() is called, as there is no way to do it using its API
otherwise.
Closes#22852.
It doesn't make sense to show sort indicator for more than one column in
the current GTK wxDataViewCtrl implementation because it always uses
exactly one column for the actual sorting, but this is exactly what
happened if SetSortOrder() was called on a column different from the
currently used one.
Explicitly reset the sort indicator shown for the old sort column to
prevent this from happening.
Make the generic version behave consistently with the native ones and
replace any existing sort columns with the current one unless multi
column sort is allowed (which is not the case by default and not
supported by the native versions).
This ensures that calling SetSortOrder() from the program now has the
same effect as clicking on the column header interactively.
This change is not backwards-compatible but can be arguably considered
as a bug fix, as it doesn't seem like the old behaviour, which showed
only one sort column in the UI, but sorted using multiple columns
internally, could be ever useful.
Normally the GTK message dialogs have non-selectable text, but that also
means users can't copy the text. This can be inconvenient if the dialog
is used for error messages, since then the error message can't be
copied.
Instead, make the text labels used in the GTK message dialog selectable
to fix that.
Closes#23039.
Use the correct scaling factor when creating the bitmap in
wxWindowsArtProvider, otherwise the bitmap was wrongly rescaled again
when actually using it.
It still seems wrong to always use the primary display scaling here, but
we just don't have any window to use in this code and at least it is
consistent and works when primary display scaling is not 100% now.
Closes#23031.
Closes #23038..
Native control doesn't seem to implement TCM_HITTEST correctly for the
tabs on the left or right side, so provide our own implementation of
HitTest() in this case.
Also add a unit test checking that HitTest() does something reasonable.
Closes#4775.
Closes#23023.
MinGW gcc 12 started giving this (useful) warning in STL build because
its std::vector::operator[] is declared with nodiscard attribute, but we
really don't want to use the result here, so suppress it.
Previously the best size of such TLW was determined by the current size
of its only child, which is the behaviour inherited from wxWindow, where
it makes sense, as it works for the manually positioned children.
However at TLW level, the only child is not positioned manually but is
resized to the available client size by default, which means that this
logic didn't make much sense, as the best size grew whenever the TLW was
made larger but never shrunk.
Fix this by returning the best size of the unique child, if we have one,
as this seems much more logical: now the TLW best size is just big
enough for its contents, just as it should be.
In particular, this avoids making such TLWs bigger on each change from
higher to lower DPI in wxMSW, where the code ensures that the window is
still big enough to fit its contents at the new DPI.
Closes#22983.
Create GetUniqueChild() and UsesAutoLayout() functions by extracting
them from Layout(), as they are going to be reused elsewhere.
No real changes yet, even though the check for the child being shown has
been slightly changed, it still does the same thing as before.
This commit is best viewed with Git --color-moved
--color-moved-ws=ignore-all-space -w options.
The crash happens inside QTreeView::keyPressEvent(QKeyEvent*) when handling
Qt::Key_Asterisk key press. The reason is the non conformant rowCount() and
columnCount() implementations which according to Qt documentation should
return 0 when the parent is valid.