Commit Graph

8 Commits

Author SHA1 Message Date
Benjamin Otte
ee3faf24b9 sortlistmodel: Make sort stable
The sort of the sortlistmodel is now stable with respect to the original
list model.

That means that if the sorter compares items as equal, the model
will make sure those items keep the order they were in in the original
model.

Or in other words: The model guarantees a total order based on the
item's position in the original model.
2020-05-30 19:26:44 -04:00
Benjamin Otte
16ab648093 sortlistmodel: Redo the way we store the items
We need to keep this data around for changes in future commits where we
make the sorting stable.

An important part of the new data handling is that the unsorted list
needs to always be dealt with before the sorted list - upon creation we
rely on the unsorted iter and upon destruction, the sorted sequence
frees the entry leaving the unsorted sequence pointer invalid.

This change does not do any behavioral changes.
2020-05-30 19:26:44 -04:00
Matthias Clasen
11a1f8f36a Redo sort list model with GtkSorter
Reshuffle the api to take full advantage
of GtkSorter. Update all callers.
2020-05-30 19:26:44 -04:00
Robert Ancell
83867f9cbf Add missing (closure) GIR annotations 2020-01-13 14:26:50 +13: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
Rico Tzschichholz
f3e6d00db1 gtk: Fix some g-i annotations warnings 2018-09-17 13:00:36 +02:00
Benjamin Otte
b92c328425 sortlistmodel: Actually insert unsorted items at the wrong place
We were adding items in reverse order, oops.
2018-09-17 03:57:37 +02:00
Benjamin Otte
f3834138f7 GtkSortListModel: Add 2018-09-16 18:50:17 +02:00