Package: gtk

Accessor gtk:sort-list-model-pending

Lambda List

gtk:sort-list-model-pending (object)

Syntax

(gtk:sort-list-model-pending object) => pending

Arguments

object -- a gtk:sort-list-model object
pending -- an unsigned integer with the estimate of unsorted items remaning

Details

Accessor of the pending slot of the gtk:sort-list-model class. The gtk:sort-list-model-pending estimates progress of an ongoing sorting operation.

The estimate is the number of items that would still need to be sorted to finish the sorting operation if this was a linear algorithm. So this number is not related to how many items are already correctly sorted.

If you want to estimate the progress, you can use code like this:
(let* ((pending (gtk:sort-list-model-pending model))
       (store (gtk:sort-list-model-model model))
       (progress (- 1.0 (/ pending
                           (max 1 (g:list-model-n-items store))))))
  ... )  
If no sort operation is ongoing, in particular when the incremental property is false, this function returns 0.
 

See also

g:sort-list-model
2024-12-15