diff options
author | Not Zed <NotZed@HelixCode.com> | 2000-11-21 07:49:53 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-11-21 07:49:53 +0800 |
commit | 7b8057a43c064a5f5a3611eb59d8bd68d1aabe11 (patch) | |
tree | 1e10e2e6198374cb819c2f74809d9bf87cfeb8e1 /mail/message-list.c | |
parent | 768136e12929387977670515f30d87d7a91a7865 (diff) | |
download | gsoc2013-evolution-7b8057a43c064a5f5a3611eb59d8bd68d1aabe11.tar.gz gsoc2013-evolution-7b8057a43c064a5f5a3611eb59d8bd68d1aabe11.tar.zst gsoc2013-evolution-7b8057a43c064a5f5a3611eb59d8bd68d1aabe11.zip |
Save out the md5 hash of the messageid as hex, since thats all we have for
2000-11-20 Not Zed <NotZed@HelixCode.com>
* message-list.c (save_node_state): Save out the md5 hash of the
messageid as hex, since thats all we have for those nodes.
(build_subtree): Expand the messageid to a hex string first, then
check it.
(add_node_diff): And the same here.
* message-thread.c (thread_messages): Changed for changes to
messageid/references items.
(id_hash, id_equal): New functions to hash on the binary message id hash.
(thread_messages): removed some more no longer used dead code.
svn path=/trunk/; revision=6617
Diffstat (limited to 'mail/message-list.c')
-rw-r--r-- | mail/message-list.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/mail/message-list.c b/mail/message-list.c index f4aa692309..3e478c388a 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -1263,7 +1263,7 @@ save_node_state(MessageList *ml, FILE *out, ETreePath *node) if (id_is_uid(data)) { info = camel_folder_get_message_info(ml->folder, id_uid(data)); if (info) { - fprintf(out, "%s\n", info->message_id); + fprintf(out, "%08x%08x\n", info->message_id.id.part.hi, info->message_id.id.part.lo); } } else { fprintf(out, "%s\n", data); @@ -1435,9 +1435,11 @@ build_subtree (MessageList *ml, ETreePath *parent, struct _container *c, int *ro id = new_id_from_uid(c->message->uid); g_hash_table_insert(ml->uid_rowmap, id_uid(id), GINT_TO_POINTER ((*row)++)); if (c->child) { - if (c->message && c->message->message_id) - expanded = !g_hash_table_lookup(expanded_nodes, c->message->message_id) != 0; - else + if (c->message) { + char key[17]; + sprintf(key, "%08x%08x", c->message->message_id.id.part.hi, c->message->message_id.id.part.lo); + expanded = !g_hash_table_lookup(expanded_nodes, key) != 0; + } else expanded = TRUE; } } else { @@ -1493,9 +1495,11 @@ add_node_diff(MessageList *ml, ETreePath *parent, ETreePath *path, struct _conta g_hash_table_remove(ml->uid_rowmap, id_uid(id)); g_hash_table_insert(ml->uid_rowmap, id_uid(id), GINT_TO_POINTER (*row)); if (c->child) { - if (c->message && c->message->message_id) - expanded = !g_hash_table_lookup(expanded_nodes, c->message->message_id) != 0; - else + if (c->message) { + char key[17]; + sprintf(key, "%08x%08x", c->message->message_id.id.part.hi, c->message->message_id.id.part.lo); + expanded = !g_hash_table_lookup(expanded_nodes, key) != 0; + } else expanded = TRUE; } } else { |