(top0): set read attribute and MAIL_ATTRIBUTE_SHOWN after displaying the message
Showing
1 changed file
with
6 additions
and
1 deletions
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. | 2 | Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc. |
3 | 3 | ||
4 | GNU Mailutils is free software; you can redistribute it and/or modify | 4 | GNU Mailutils is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
... | @@ -29,6 +29,7 @@ top0 (msgset_t *mspec, message_t msg, void *data) | ... | @@ -29,6 +29,7 @@ top0 (msgset_t *mspec, message_t msg, void *data) |
29 | size_t n; | 29 | size_t n; |
30 | off_t off; | 30 | off_t off; |
31 | int lines; | 31 | int lines; |
32 | attribute_t attr = NULL; | ||
32 | 33 | ||
33 | if (util_getenv (&lines, "toplines", Mail_env_number, 1) | 34 | if (util_getenv (&lines, "toplines", Mail_env_number, 1) |
34 | || lines < 0) | 35 | || lines < 0) |
... | @@ -43,6 +44,10 @@ top0 (msgset_t *mspec, message_t msg, void *data) | ... | @@ -43,6 +44,10 @@ top0 (msgset_t *mspec, message_t msg, void *data) |
43 | fprintf (ofile, "%s", buf); | 44 | fprintf (ofile, "%s", buf); |
44 | } | 45 | } |
45 | cursor = mspec->msg_part[0]; | 46 | cursor = mspec->msg_part[0]; |
47 | |||
48 | message_get_attribute (msg, &attr); | ||
49 | attribute_set_read (attr); | ||
50 | attribute_set_userflag (attr, MAIL_ATTRIBUTE_SHOWN); | ||
46 | return 0; | 51 | return 0; |
47 | } | 52 | } |
48 | 53 | ... | ... |
-
Please register or sign in to post a comment