Rename BuildGit.txt to README-GIT.md, which is a more standard name, and
a better format for viewing this file online, e.g. from GitHub Web UI,
and link it from the main README to make it easier to find.
Setting the column sizes fails with wxGTK implementation of
wxDataViewCtrl if the control is not wide enough, apparently, so make
sure it's sufficiently big when creating it to fix the unit test
failures on wxGTK build bot slaves.
gtk_settings_set_long_property() is no longer available. The properties
"gtk-enable-tooltips" and "gtk-tooltip-timeout" are ignored since GTK+
3.10, so just don't compile that code with GTK+4.
MSVS 2017 (which uses _MSC_VER from 1910 to 1912 currently) is
ABI-compatible with MSVS 2015 (_MSC_VER 1900), so do allow linking code
compiled with one of them with the library built by the other one.
Closes#18024.
This reverts commit 41f6f17d01 ("return 0
(meaning the file is not seekable, as the docs now explain) instead of
4KB for the files in sysfs under Linux") as it seems to be wrong to
return a value different from what "ls -l" or "stat" return here and the
original problem was solved in a better way in the previous commit.
See #9965.
Closes#17818.
There is nothing special about wxTextFile justifying having code for
dealing with non-seekable files in it, so put this code into wxFile
itself and just call its ReadAll() method from here.
This is a better fix than 41f6f17d01
originally applied (and which is going to be reverted next) as it
doesn't break wxFile::Length() for these files and also avoids
triggering an assert if the file we're trying to read was truncated by
another process in the meanwhile -- which can happen and doesn't
indicate a programming error and so shouldn't result in an assert.
Also add a unit test checking that this really works.
See #3802, #8354, #9965.
Calling this function with an unseekable file, such as any file under
/sys on Linux systems, would previously just hang as the loop condition
was never satisfied when length was -1.
Fix this by checking for this case and using a different approach by
extending the buffer we read the data into as we go instead of
preallocating it all at once.
See #9965.
If the event handler destroys the wxWindow, then the subsequent call to SetupCursor(event) will miserably fail .
Moved setting the cursor before the event is handled.
This requires slightly more work, but ensures that we don't leave any
traces of running the tests in the system registry or file system, as we
can just call DeleteAll() on the config object after finishing with it.
It seems better to organize the tests in different files and just
provide a common fixture-like class to reuse functionality.
Also use this as an opportunity to rewrite the tests to use Catch
directly instead of using CppUnit-compatible macros.
Finally, actually build these tests as part of the test suite.
GtkStock names are used for GTK+2, theme names for GTK+3 and later.
Theme replacements for stock items are those used by GTK+, from
gtk+-3.22.26/gtk/deprecated/gtkiconfactory.c. The list is as it was
prior to 4862884e, with no additions, deletions or other changes.
This could be unexpected as it seems reasonable that the model won't be
ever asked about the value of a cell if it's not going to appear in it
anyhow -- however it could still happen during the column width
computation in the generic wxDataViewCtrl implementation.
Fix this in a minimally invasive way by just skipping the call to
GetValue() in this case.
Don't use gtk_tree_view_set_rules_hint() in GTK+4, it's not available.
It is also deprecated in GTK+3 since 3.14, and the documentation advises
to not use it at all, but I will leave the decision about whether to
remove it entirely to someone else.
Support the GTK+4 API for adding buttons to dialogs (via __WXGTK4__):
- set_icon_name() instead of image_new_from_stock()/set_image()
- gtk_box_pack_end() takes only two parameters
GTK+3 deprecates GTK_STOCK_CANCEL and GTK_STOCK_SAVE etc. and GTK+4
removes them entirely. The API documentation recommends using the
strings "Cancel" and "Save" instead, use them (or the appropriate
translation.)