Currently, if you sort by date you get a sorting based on the initial mail in each thread. It would be more desirable to have it sort based on the most recent mail in each thread. It is very annoying to have to scroll way down just because the active thread was started a long time ago.
I'm afraid my GTK skills are abysmal, otherwise I could solve this myself. I made an attempt, which gave some effect but not completely correct: static void summary_thread_age(GtkCTree *ctree, GtkCTreeNode *node, gpointer data) { MsgInfo *msginfo = gtk_ctree_node_get_row_data(ctree, node); time_t *t = (time_t*)data; if (msginfo->date_t > *t) *t = msginfo->date_t; } static gint summary_cmp_by_date(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) { time_t t1, t2; const SummaryView *sv = g_object_get_data(G_OBJECT(clist), "summaryview"); GtkCTree *ctree = GTK_CTREE(sv->ctree); GtkCTreeRow *row1 = (GtkCTreeRow*)ptr1; GtkCTreeRow *row2 = (GtkCTreeRow*)ptr2; MsgInfo *msginfo1 = ((GtkCListRow *)ptr1)->data; MsgInfo *msginfo2 = ((GtkCListRow *)ptr2)->data; GtkCTreeNode *node1, *node2; // node1 = gtk_ctree_find_node_ptr(ctree, row1); // node2 = gtk_ctree_find_node_ptr(ctree, row2); t1 = msginfo1->date_t; t2 = msginfo2->date_t; gtk_ctree_post_recursive(ctree, row1->children, summary_thread_age, &t1); gtk_ctree_post_recursive(ctree, row2->children, summary_thread_age, &t2); return t1 - t2; } I think my basic problem is getting a GtkCTreeNode from the GtkCListRow.
*** This bug has been marked as a duplicate of bug 1233 ***