summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-03-03 23:32:14 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-03-03 23:32:14 +0000
commit164285a54b04667c6b422e508be4288c746fb74f (patch)
tree9b66c7843c5f6068b5b3a14863643f94b49f0ad8
parent32bd21793007851d5a5c514ca972e2fe2af1d3f1 (diff)
downloadmailutils-164285a54b04667c6b422e508be4288c746fb74f.tar.gz
mailutils-164285a54b04667c6b422e508be4288c746fb74f.tar.bz2
(top0): set read attribute and MAIL_ATTRIBUTE_SHOWN after displaying the message
-rw-r--r--mail/top.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mail/top.c b/mail/top.c
index 5074cdc2e..a01ce8841 100644
--- a/mail/top.c
+++ b/mail/top.c
@@ -1,5 +1,5 @@
/* GNU Mailutils -- a suite of utilities for electronic mail
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,7 +29,8 @@ top0 (msgset_t *mspec, message_t msg, void *data)
size_t n;
off_t off;
int lines;
-
+ attribute_t attr = NULL;
+
if (util_getenv (&lines, "toplines", Mail_env_number, 1)
|| lines < 0)
return 1;
@@ -43,6 +44,10 @@ top0 (msgset_t *mspec, message_t msg, void *data)
fprintf (ofile, "%s", buf);
}
cursor = mspec->msg_part[0];
+
+ message_get_attribute (msg, &attr);
+ attribute_set_read (attr);
+ attribute_set_userflag (attr, MAIL_ATTRIBUTE_SHOWN);
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.