g_hash_table_foreach(mark_table, mark_sum_func, &marksum);
g_hash_table_destroy(mark_table);
}
+ debug_print("mark->new = %d, mark->unread = %d, mark->total = %d\n",
+ *(marksum.new), *(marksum.unread), *(marksum.total));
}
static GHashTable *procmsg_read_mark_file(const gchar *folder)
return fp;
}
-static GNode * subject_table_lookup(GHashTable * subject_table,
- gchar * subject)
-{
- if (subject == NULL)
- subject = "";
-
- if (g_strncasecmp(subject, "Re: ", 4) == 0)
- return g_hash_table_lookup(subject_table, subject + 4);
- else
- return g_hash_table_lookup(subject_table, subject);
-}
-
-static void subject_table_insert(GHashTable * subject_table, gchar * subject,
- GNode * node)
-{
- if (subject == NULL)
- subject = "";
-
- if (g_strncasecmp(subject, "Re: ", 4) == 0)
- g_hash_table_insert(subject_table, subject + 4, node);
- else
- g_hash_table_insert(subject_table, subject, node);
-}
-
/* return the reversed thread tree */
GNode *procmsg_get_thread_tree(GSList *mlist)
{
if (msginfo->inreplyto)
parent = g_hash_table_lookup(msgid_table, msginfo->inreplyto);
- if (parent == NULL)
+ if (parent == NULL && subject_is_reply(msginfo->subject))
parent = subject_table_lookup(subject_table, msginfo->subject);
-
if (parent && parent != node) {
g_node_unlink(node);