ListStore.insertSorted

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

item gobject.object.ObjectWrap

the new item

compareFunc int delegate
(
gobject.object.ObjectWrap
,
gobject.object.ObjectWrap
)

pairwise comparison function for sorting

Return Value

Type: uint

the position at which item was inserted