ListStore.insertSorted

uint insertSorted(gobject.object.ObjectWrap item, int delegate(gobject.object.ObjectWrap, gobject.object.ObjectWrap) compareFunc)

Inserts item into store at a position to be determined by the compare_func. The list must already be sorted before calling this function or the result is undefined. Usually you would approach this by only ever inserting items by way of this function. This function takes a ref on item.

Parameters

itemthe new item
compareFuncpairwise comparison function for sorting

Returns

the position at which item was inserted