No real changes, but the code is slightly shorter, maybe more clear and
will be easier to maintain (because more difficult to break
accidentally) in the future.
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.
This didn't make any sense, all these objects reachable from the given
root node are used by the same window, so storing the same pointer in
all of them just wasted memory unnecessarily.
Avoid this by passing wxDataViewMainWindow pointer explicitly to those
methods of wxDataViewTreeNode that need it.
No changes in behaviour, this is just a (memory use) optimization.
Test whether this is the first child before testing whether the branch
is open as this allows to avoid the special case of inserting the first
child under the root node and simplifies the assert condition to a
simple check that the sort order is already what we expect.
Having to set up global variables before (re)sorting the items was too
ugly and became even more so after the latest changes optimizing item
sorting as sorting is done in more places now.
Improve the code by introducing a SortOrder class instead of dealing
with the sort column and sort order direction separately and,
especially, by using std::sort() (which should be fine to use here,
considering that it's used since quite some time in wxArrayString
implementation) with a comparator object instead of qsort(), which
doesn't allow passing any data to the sort callback otherwise than via
the global variables.
No changes in behaviour.
Simplify some code and make it more clear, notably by changing
conditionals to be easier to follow.
Also avoid repeating the same functions calls (like SortPrepare() or
UpdateDisplay()) by folding them into the functions that actually need
them to be done.
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.
By simply putting two bool fields consecutively to each other, we reduce
the number of bytes of padding used from 6 to 2 in a typical 32 bit
build, saving 4 (or 8, in 64 bits) bytes per branch item.
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.