aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/nntp/camel-nntp-utils.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-07-13 05:24:26 +0800
committerChris Toshok <toshok@src.gnome.org>2000-07-13 05:24:26 +0800
commit77e647292603294f23999183578d8cc276f3d402 (patch)
tree88ecbac88657f92ed7792da5ffc133b3d288bb58 /camel/providers/nntp/camel-nntp-utils.c
parent540e1d7671ec843c2db2d03810d948f879ac1bfc (diff)
downloadgsoc2013-evolution-77e647292603294f23999183578d8cc276f3d402.tar.gz
gsoc2013-evolution-77e647292603294f23999183578d8cc276f3d402.tar.zst
gsoc2013-evolution-77e647292603294f23999183578d8cc276f3d402.zip
get the article num out of our uid and mark it read in the newsrc.
2000-07-12 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-folder.c (nntp_folder_set_message_flags): get the article num out of our uid and mark it read in the newsrc. (nntp_folder_get_message): get the message id out of the uid to fetch the article. * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid is now <article-num>,<messageid> (get_HEAD_headers): same. * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE state when ct->subtype is "news" as well as "rfc822". this makes attachments of type "message/news" display properly. svn path=/trunk/; revision=4121
Diffstat (limited to 'camel/providers/nntp/camel-nntp-utils.c')
-rw-r--r--camel/providers/nntp/camel-nntp-utils.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/camel/providers/nntp/camel-nntp-utils.c b/camel/providers/nntp/camel-nntp-utils.c
index 864271cd2c..e0a331f2a7 100644
--- a/camel/providers/nntp/camel-nntp-utils.c
+++ b/camel/providers/nntp/camel-nntp-utils.c
@@ -69,10 +69,15 @@ get_XOVER_headers(CamelNNTPStore *nntp_store, CamelFolder *folder,
new_info->headers.date_received = g_strdup(split_line[3]);
#endif
new_info->size = atoi(split_line[5]);
- new_info->uid = g_strdup(split_line[4]);
+ new_info->uid = g_strdup_printf ("%s,%s", split_line[0], split_line[4]);
new_info->message_id = g_strdup(split_line[4]);
g_strfreev (split_line);
+ if (camel_nntp_newsrc_article_is_read (nntp_store->newsrc,
+ nntp_folder->group_name,
+ atoi (split_line[0])))
+ new_info->flags |= CAMEL_MESSAGE_SEEN;
+
camel_folder_summary_add (nntp_folder->summary, new_info);
}
g_free (line);
@@ -153,7 +158,7 @@ get_HEAD_headers(CamelNNTPStore *nntp_store, CamelFolder *folder,
else if (!g_strcasecmp(header->name, "Subject"))
new_info->subject = g_strdup(header->value);
else if (!g_strcasecmp(header->name, "Message-ID")) {
- new_info->uid = g_strdup(header->value);
+ new_info->uid = g_strdup_printf("%d,%s", i, header->value);
new_info->message_id = g_strdup(header->value);
}
else if (!g_strcasecmp(header->name, "Date")) {