GNOME Bugzilla – Bug 658336
History window "Who" list should sort alphabetically
Last modified: 2011-09-08 11:53:27 UTC
The "Who"-list in the new History window is sorted with "g_strcmp0 (contact_name)" which is not what we want in a lot of cases: As an example "Chris" becomes before "bob" because of the initial capital letter. Will attach a patch.
Created attachment 195765 [details] [review] log-window: sort "Who" list store alphabetically This commit should fix things. Some semi-related comments: * The gtk_list_store_set() code is in two almost identical places, I didn't refactor that here but it could be made into a function. * Does GtkTreemodel suck or what? Having to allocate and free strings in a GtkTreeIterCompareFunc feels so wrong...
Comment on attachment 195765 [details] [review] log-window: sort "Who" list store alphabetically Looks good
(In reply to comment #1) > * Does GtkTreemodel suck or what? Having to allocate and free strings in a > GtkTreeIterCompareFunc feels so wrong... Yes, gtk_tree_model_get() returns new refs for objects and new strings for strings.
(In reply to comment #3) > Yes, gtk_tree_model_get() returns new refs for objects and new strings for > strings. Yeah, I was just whining about it: potentially thousands and thousands of string allocates and frees for absolutely no benefit to anyone... Anyway, Thanks for the prompt review and the good work: the new history window has made Empathy a lot more useful for me.
Attachment 195765 [details] pushed as 777e9d3 - log-window: sort "Who" list store alphabetically