From 2d33aa8a7781502e3d5297409dda389553cc8953 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 7 Jul 2000 21:15:11 +0000 Subject: Lots of changes. Store uids as node data on the tree nodes and use those * message-list.c: Lots of changes. Store uids as node data on the tree nodes and use those rather than rows where possible. (The concept of "row" is just getting too complicated.) Get rid of the summary_table, because given a uid we can call camel_folder_get_message_info, which makes more sense than keeping a separate uid->row hash table ourselves. (get_message_info): update (get_message_row): removed (ml_col_cound, ml_row_count, ml_value_at, ml_set_value_at, ml_cell_is_editable, ml_duplicate_value, ml_free_value, ml_initialize_value, ml_value_is_empty, ml_value_to_string): Removed. We always use the tree model now. (message_list_init): Remove the non-tree code. (build_tree): store uids in the tree rather than row numbers, and build the message_list->uid_rowmap to map from uids to rows when needed. (message_list_regenerate): Renamed from _set_search, since it's used to redraw in non-search cases too. (message_changed): Use the uid_rowmap to get a model row number. * message-thread.c (thread_messages): Change the interface on this to work with the new MessageList. * folder-browser.c (search_set, folder_browser_clear_search): s/message_list_set_search/message_list_regenerate/ svn path=/trunk/; revision=3960 --- mail/message-thread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mail/message-thread.c') diff --git a/mail/message-thread.c b/mail/message-thread.c index 780735bd9e..789536ba34 100644 --- a/mail/message-thread.c +++ b/mail/message-thread.c @@ -405,7 +405,7 @@ sort_thread(struct _container **cp) } struct _container * -thread_messages(CamelMessageInfo **messages, int count) +thread_messages(CamelFolder *folder, GPtrArray *uids) { GHashTable *id_table; int i; @@ -413,9 +413,9 @@ thread_messages(CamelMessageInfo **messages, int count) struct _header_references *ref; id_table = g_hash_table_new(g_str_hash, g_str_equal); - for (i=0;ilen;i++) { + const CamelMessageInfo *mi; + mi = camel_folder_get_message_info (folder, uids->pdata[i]); if (mi->message_id) { d(printf("doing : %s\n", mi->message_id)); c = g_hash_table_lookup(id_table, mi->message_id); -- cgit v1.2.3