diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-03-05 09:51:17 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-03-05 09:51:17 +0000 |
commit | 2edc1b1269719370346e304e3d65079e05983397 (patch) | |
tree | f7c4b59b43b6b958d2c8ffee9ceec6919eb54124 | |
parent | 82f2f53e1d8c7e2122a0004ef299422cf3f1c9cf (diff) | |
download | mailutils-2edc1b1269719370346e304e3d65079e05983397.tar.gz mailutils-2edc1b1269719370346e304e3d65079e05983397.tar.bz2 |
Mark message as read and shown
-rw-r--r-- | mail/decode.c | 10 | ||||
-rw-r--r-- | mail/mbox.c | 3 | ||||
-rw-r--r-- | mail/pipe.c | 3 | ||||
-rw-r--r-- | mail/print.c | 4 | ||||
-rw-r--r-- | mail/top.c | 6 | ||||
-rw-r--r-- | mail/undelete.c | 4 | ||||
-rw-r--r-- | mail/visual.c | 6 |
7 files changed, 16 insertions, 20 deletions
diff --git a/mail/decode.c b/mail/decode.c index 33ecb890f..b28c30172 100644 --- a/mail/decode.c +++ b/mail/decode.c @@ -1,5 +1,6 @@ /* GNU Mailutils -- a suite of utilities for electronic mail - Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2003, + 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 @@ -77,11 +78,8 @@ display_message (message_t mesg, msgset_t *msgset, void *arg) /* Mark enclosing message as read */ if (mailbox_get_message (mbox, msgset->msg_part[0], &mesg) == 0) - { - attribute_t attr; - message_get_attribute (mesg, &attr); - attribute_set_read (attr); - } + util_mark_read (mesg); + return 0; } diff --git a/mail/mbox.c b/mail/mbox.c index 01bbb1cdd..cf28b87b8 100644 --- a/mail/mbox.c +++ b/mail/mbox.c @@ -1,5 +1,5 @@ /* GNU Mailutils -- a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1999, 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 @@ -28,6 +28,7 @@ mbox0 (msgset_t *mspec, message_t msg, void *data) message_get_attribute (msg, &attr); attribute_set_userflag (attr, MAIL_ATTRIBUTE_MBOXED); + util_mark_read (msg); cursor = mspec->msg_part[0]; diff --git a/mail/pipe.c b/mail/pipe.c index 943a804c6..6c2655478 100644 --- a/mail/pipe.c +++ b/mail/pipe.c @@ -1,5 +1,5 @@ /* GNU Mailutils -- a suite of utilities for electronic mail - Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2001, 2003, 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 @@ -60,6 +60,7 @@ mail_pipe (int argc, char **argv) if (util_getenv (NULL, "page", Mail_env_boolean, 0) == 0) fprintf (tube, "\f\n"); } + util_mark_read (msg); } msgset_free (list); diff --git a/mail/print.c b/mail/print.c index 4b9dfac65..0fbd1afbc 100644 --- a/mail/print.c +++ b/mail/print.c @@ -103,9 +103,7 @@ mail_print_msg (msgset_t *mspec, message_t mesg, void *data) if (out != ofile) pclose (out); - message_get_attribute (mesg, &attr); - attribute_set_read (attr); - attribute_set_userflag (attr, MAIL_ATTRIBUTE_SHOWN); + util_mark_read (mesg); cursor = mspec->msg_part[0]; diff --git a/mail/top.c b/mail/top.c index a01ce8841..d182af03c 100644 --- a/mail/top.c +++ b/mail/top.c @@ -29,7 +29,6 @@ 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) @@ -45,9 +44,8 @@ top0 (msgset_t *mspec, message_t msg, void *data) } cursor = mspec->msg_part[0]; - message_get_attribute (msg, &attr); - attribute_set_read (attr); - attribute_set_userflag (attr, MAIL_ATTRIBUTE_SHOWN); + util_mark_read (msg); + return 0; } diff --git a/mail/undelete.c b/mail/undelete.c index b4b6cff86..9ddef3416 100644 --- a/mail/undelete.c +++ b/mail/undelete.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 @@ -28,6 +28,8 @@ undelete0 (msgset_t *mspec, message_t msg, void *data) message_get_attribute (msg, &attr); attribute_unset_deleted (attr); + util_mark_read (msg); + if (cursor == 0) cursor = mspec->msg_part[0]; return 0; diff --git a/mail/visual.c b/mail/visual.c index a3292a0e8..2421af805 100644 --- a/mail/visual.c +++ b/mail/visual.c @@ -1,5 +1,5 @@ /* GNU Mailutils -- a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1999, 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 @@ -24,7 +24,6 @@ static int visual0 (msgset_t *mspec, message_t msg, void *data) { - attribute_t attr = NULL; char *file = mu_tempname (NULL); util_do_command ("copy %s", file); @@ -34,8 +33,7 @@ visual0 (msgset_t *mspec, message_t msg, void *data) free (file); /* Mark as read */ - message_get_attribute (msg, &attr); - attribute_set_read (attr); + util_mark_read (msg); cursor = mspec->msg_part[0]; |