SortListModel.getPending

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:

pending = gtk_sort_list_model_get_pending (self);
model = gtk_sort_list_model_get_model (self);
progress = 1.0 - pending / (double) MAX (1, g_list_model_get_n_items (model));

If no sort operation is ongoing - in particular when [property@Gtk.SortListModel:incremental] is %FALSE - this function returns 0.

class SortListModel
uint
getPending
()

Return Value

Type: uint

a progress estimate of remaining items to sort

Meta