GtkTreeView Sorting Comparison Function



Hi,

I am populating a tabular GtkTreeView using a GtkListStore and a
GtkTreeModelSort for sorting.  I use
gtk_tree_view_colum_set_sort_column_id() and
gtk_tree_sortable_set_sort_func() to allow some of my columns to be
sorted using a custom sort function.

I noticed that while a column is being sorted, and anything in the list
store is changed, my custom sort function is called many times.  This is
true for any change in any column - including hidden columns, columns
not flagged for sorting, and columns used for color formatting.

It seems very inefficient to re-sort based on any change in the store.
Is there any way to prevent the re-sort trigger for certain column
changes or to temporarily disable it while making changes that will not
affect the sort order?

Thanks,
Anthony Vallone


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]