Commit 2edc1b12 2edc1b1269719370346e304e3d65079e05983397 by Sergey Poznyakoff

Mark message as read and shown

1 parent 82f2f53e
/* 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;
}
......
/* 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];
......
/* 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);
......
......@@ -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];
......
......@@ -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;
}
......
/* 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;
......
/* 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];
......