« Return to Thread: GtkTreeView Sorting Comparison Function

GtkTreeView Sorting Comparison Function

by Vallone, Anthony :: Rate this Message:

Reply to Author | View in Thread

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
_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list

 « Return to Thread: GtkTreeView Sorting Comparison Function

LightInTheBox - Buy quality products at wholesale price!