wxDataViewTextRenderer::SetAlignment didn't consider the posibility of
alignment being -1, causing the align & wxALIGN_RIGHT test to succeed
and the text to be right-aligned if explicit alignment wasn't provided.
This fix is only partial in that it simply does nothing in this case.
The correct thing to do is to determine and apply alignment later, once
it's known, but that's not possible to do on the 3.0 branch while
preserving binary compatibility.
(inspired by a6be5bdae3)
In both the generic and GTK+ implementations, setting the value of a
bitmap column to wxNullVariant resulted in the bitmap, if set for some
rows, being repeated on the rows with null value.
(cherry picked from commit f3b8dac3b7)
Consistently with other implementations, accept wxNullBitmap and
wxNullIcon in wxDataViewBitmapRenderer if the column shouldn't show any
icon.
(cherry picked from commit ae93a83e76)
wxString iterators can't be dereferenced once they reach the end of the
string, so compare them with end rather than checking if the value they point
to is non-NUL.
This makes wxFTP::Pwd() actually work, which was apparently broken since quite
some time (perhaps ever since c9f7896861 9+
years ago).
See #17679.
(cherry picked from commit d0c57dbef0)
As all tests need a valid connection, just do it once in the test set up
instead of duplicating the call to Connect() in all tests.
No real changes.
(cherry picked from commit 461d0b2005)
wxGetKeyState() does not currently work on non-X11 GTK backends, and in some
cases it has been reported to crash. It seems that the most likely use case
for wxGetKeyState() is to query the modifier keys, so on non-X11 backends, use
GTK+ calls to retrieve the modifier key state.
Non-modifier keys are not currently implemented, update the documentation to
mention this.
Closes https://github.com/wxWidgets/wxWidgets/pull/322
(this is a combined backport of 1033fb048d,
9f9c09e24a and
a18fe083cc from master)
This allows running with a GTK+ library that was built with different backends
than the one wxWidgets was built with. Since GTK3 provides no way to determine
the backends available at run-time, avoid referencing symbols in the backends
by checking the type name of the GdkDisplay, on the assumption that they are
unlikely to ever be changed. The X11 backend is still required at run-time if
it was available at build-time, although this dependency could also be removed.
(cherry picked from commit 1ba59a410f)
Check if copying file actually succeeded, any IO errors that could happen in
it were previously just completely ignored.
See #17638.
(cherry picked from commit a93dcc531c)
Width and height were exchanged in the loops, so the conversion code didn't
work correctly and overflowed the pixel buffer (due to extra padding in the
row stride) for non-square bitmaps. It also resulted in a completely wrong
bitmap appearance, but somehow this managed to go unnoticed, unlike the memory
errors.
See #17633.
(cherry picked from commit f9740e8180)
Fix assert failures when reporting errors in config files under 64 bit systems
where "%d" can't be used to output a "size_t" value.
See #17630.
(cherry picked from commit 75e254fce7)
Use pango_font_description_copy() to make a lossless copy of the original font
instead of doing it using wxWidgets API which is less direct and, in addition,
currently is completely broken as SetXXX() methods don't create the Pango font
description if it doesn't exist as they ought to.
See https://github.com/wxWidgets/wxWidgets/pull/312
(cherry picked from commit dbe2a1c2fd)
In a wxFontEnumerator, if false is returned from OnFacename() or
OnFontEncoding(), the enumeration is supposed to stop. This was not happening
on wxGTK.
See https://github.com/wxWidgets/wxWidgets/pull/311
(cherry picked from commit 3572c2c654)