GNOME Bugzilla – Bug 754152
Add g_list_store_sort
Last modified: 2015-08-31 14:44:07 UTC
This makes it much more practical to use model-based sorting, with possibly changing sort functions.
Created attachment 310069 [details] [review] Add g_list_store_store
Patch looks good, thanks. We already have g_list_store_insert_sorted(). Is this meant for the case that the model should be resorted for viewing?
2 nitpicks: The commit message should say g_list_store_sort and not g_list_store_store. Is "$GListStore" a syntax I don't know about or should it be #GListStore in the doc comment?
Created attachment 310367 [details] [review] Add g_list_store_sort GListStore already has a g_list_store_insert_sorted function, which can be used to keep the list sorted according to a fixed sort function. But if the sort function changes (as e.g. with sort columns in a list UI), the entire list needs to be resorted. In that case, you want g_list_store_sort().
Typos fixed, better rationale added.
Attachment 310367 [details] pushed as e5734c3 - Add g_list_store_sort