Skip to content

Draft: number-list: Add binding from GSettings to AdwComboRow

After working on !2587 (merged), I realized the logic from the port of 55852fa7 can be improved.

The most common use case for CcNumberList is inside an AdwComboRow, with it being used to set a GSettings key value.

So, let's add an easy function to perform such a binding. It binds the "selected" property of an AdwComboRow based on a CcNumberList to a GSettings value using mapping functions. If the value does not exist in the CcNumberList yet, it will be added to the list and selected.

It makes sure both unsigned and signed values are properly handled, as CcNumberList only holds signed values.

Edited by Matthijs Velsink

Merge request reports