Commit Graph

7 Commits

Author SHA1 Message Date
Benjamin Otte
129691f3a6 flattenlistmodeL: Compute items-changed position properly
The code previously forgot to include the left child of the model's
node. Which of course only happened if that child wasn't NULL, which is
a common case.

Found and test provided by Matthias Clasen.
2019-07-02 02:53:00 +02:00
Benjamin Otte
3e5f5d3959 flattenlistmodel: Do proper check
If we want the model items to be listmodels, we don't need to do a ==
comparison. We need to do g_type_is_a(). Implementations of listmodels
are obviously fine.
2019-05-15 23:39:37 +02:00
Matthias Clasen
d3c45cb979 docs: Miscellaneous doc fixes
Additions and correction all over the place,
in GDK and GTK docs.
2019-02-24 16:53:12 -05:00
Benjamin Otte
8a7706f2b5 rbtree: Make node getters not require tree argument
The tree is not needed to walk around the nodes.

It is however still needed for anything that requires modifying the
tree.

There is no immediate benefit in changing this API, but there might be
situations in the future where we can avoid looking up the tree when we
just want to check some details about the node.
2019-01-14 02:14:11 +01:00
Matthias Clasen
25bca27bfe Rename GtkCssRBTree to GtkRBTree
This is a generally usable red-black tree api,
and it is not used in css at all.
2019-01-14 02:14:11 +01:00
Yi-Soo An
4ad8dcebd8 flattenlistmodel: Fix uninitialized variable warning
Variable, added, would be a garbage value if model is NULL and
the following code, if condition, use the uninitialized variable.
A side effect could be occurred by that.

To avoid, the variable is initialized to zero.
2018-09-20 12:45:33 +09:00
Benjamin Otte
32ec7dec61 gtk: Add GtkFlattenListModel
We can flatten lists of lists into lists now!
2018-09-16 18:50:17 +02:00