This is the seventh entry in A Field Guide to GTK Widgets , a series about which widget to reach for, when, and what bites you when you do. It picks up where the filter and sort post left off and replaces the workaround that one ended on. The complete, runnable code lives in the companion repo .
Where we left off
The last post built a task list four models deep: a GListStore at the bottom, then a FilterListModel , a SortListModel and a MultiSelection . It searched, hid done tasks and sorted three ways, and two parts of it were workarounds.
Hiding done tasks had to be a BoolFilter with watch-items switched on, because watch-items only sees properties through filters built from expressions. A CustomFilter was invisible to it. Sorting had nothing at all. SortListModel has no watch-items of its own, so the Mark done button finished by calling sorter.changed(gtk::SorterChange::Different) to make it look again.
That call only helps when the change goes through that button.…