Skip to content

ListModels: Use n items instead of custom properties#2427

Merged
danirabbit merged 2 commits intomainfrom
leolost/use-n-items
Mar 1, 2026
Merged

ListModels: Use n items instead of custom properties#2427
danirabbit merged 2 commits intomainfrom
leolost/use-n-items

Conversation

@leolost2605
Copy link
Member

@leolost2605 leolost2605 commented Feb 28, 2026

All models in GTK and GLib have a n-items property. So bind to that instead of having to manage custom properties which allows for a bit of cleanup.
Also drop up_to_date since that is not used anywhere anymore.

We also don't need the has_... properties since we can just bind an int to a bool and 0 will be converted to false and anything else to true which saves us any mapping funcs.

All models in GTK and GLib have an n-items property.
So bind to that instead of having to manage custom properties.
Also drop up_to_date since that is not used anywhere anymore.
@leolost2605 leolost2605 requested a review from a team February 28, 2026 11:13
Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup!

@danirabbit danirabbit merged commit b619f3c into main Mar 1, 2026
4 checks passed
@danirabbit danirabbit deleted the leolost/use-n-items branch March 1, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants