else if (Context && Context->data == folder->ff->nd)
{
snprintf(fmt, sizeof(fmt), "%%%sd", prec);
- snprintf(buf, buflen, fmt, Context->unread);
+ snprintf(buf, buflen, fmt, Context->mailbox->msg_unread);
}
else
{
if (np && Context && (mutt_str_strcmp(np->b->realpath, Context->mailbox->realpath) == 0))
{
np->b->msg_count = Context->mailbox->msg_count;
- np->b->msg_unread = Context->unread;
+ np->b->msg_unread = Context->mailbox->msg_unread;
}
add_folder(menu, state, de->d_name, NULL, &s, np ? np->b : NULL, NULL);
}
if (Context && (mutt_str_strcmp(np->b->realpath, Context->mailbox->realpath) == 0))
{
np->b->msg_count = Context->mailbox->msg_count;
- np->b->msg_unread = Context->unread;
+ np->b->msg_unread = Context->mailbox->msg_unread;
}
char buffer[PATH_MAX];
int vcount; /**< the number of virtual messages */
int tagged; /**< how many messages are tagged? */
int new; /**< how many new messages? */
- int unread; /**< how many unread messages? */
int deleted; /**< how many deleted messages */
int flagged; /**< how many flagged messages */
int msgnotreadyet; /**< which msg "new" in pager, -1 if none */
{
h->read = false;
if (upd_ctx)
- ctx->unread++;
+ ctx->mailbox->msg_unread++;
}
h->changed = true;
if (upd_ctx)
ctx->new --;
h->read = true;
if (upd_ctx)
- ctx->unread--;
+ ctx->mailbox->msg_unread--;
h->changed = true;
if (upd_ctx)
ctx->changed = true;
update = true;
h->read = true;
if (upd_ctx)
- ctx->unread--;
+ ctx->mailbox->msg_unread--;
if (!h->old)
if (upd_ctx)
ctx->new --;
update = true;
h->read = false;
if (upd_ctx)
- ctx->unread++;
+ ctx->mailbox->msg_unread++;
if (!h->old)
if (upd_ctx)
ctx->new ++;
{
h->read = true;
if (upd_ctx)
- ctx->unread--;
+ ctx->mailbox->msg_unread--;
if (!h->old)
if (upd_ctx)
ctx->new --;
if (Context && (mutt_str_strcmp(np->b->realpath, Context->mailbox->realpath) == 0))
{
np->b->msg_count = Context->mailbox->msg_count;
- np->b->msg_unread = Context->unread;
+ np->b->msg_unread = Context->mailbox->msg_unread;
}
(state->entry)[state->entrylen].has_mailbox = true;
(state->entry)[state->entrylen].new = np->b->new;
if (ctx)
{
mailbox->msg_count = ctx->mailbox->msg_count;
- mailbox->msg_unread = ctx->unread;
+ mailbox->msg_unread = ctx->mailbox->msg_unread;
mailbox->msg_flagged = ctx->flagged;
mailbox->stats_last_checked = ctx->mtime;
mx_mbox_close(&ctx, NULL);
ctx->tagged = 0;
ctx->deleted = 0;
ctx->new = 0;
- ctx->unread = 0;
+ ctx->mailbox->msg_unread = 0;
ctx->flagged = 0;
ctx->changed = false;
ctx->id_hash = NULL;
}
#ifdef USE_NNTP
- if (ctx->unread && ctx->magic == MUTT_NNTP)
+ if (ctx->mailbox->msg_unread && ctx->magic == MUTT_NNTP)
{
struct NntpData *nntp_data = ctx->data;
for (i = 0; i < ctx->mailbox->msg_count; i++)
{
if (ctx->hdrs[i]->deleted && !ctx->hdrs[i]->read)
- ctx->unread--;
+ ctx->mailbox->msg_unread--;
if (ctx->hdrs[i]->deleted && ctx->hdrs[i]->flagged)
ctx->flagged--;
}
ctx->tagged = 0;
ctx->deleted = 0;
ctx->new = 0;
- ctx->unread = 0;
+ ctx->mailbox->msg_unread = 0;
ctx->changed = false;
ctx->flagged = 0;
padding = mx_msg_padding_size(ctx);
ctx->flagged++;
if (!ctx->hdrs[j]->read)
{
- ctx->unread++;
+ ctx->mailbox->msg_unread++;
if (!ctx->hdrs[j]->old)
ctx->new ++;
}
ctx->deleted++;
if (!h->read)
{
- ctx->unread++;
+ ctx->mailbox->msg_unread++;
if (!h->old)
ctx->new ++;
}
ctx->vcount = 0;
ctx->deleted = 0;
ctx->new = 0;
- ctx->unread = 0;
+ ctx->mailbox->msg_unread = 0;
ctx->flagged = 0;
ctx->changed = false;
ctx->id_hash = NULL;
if (!nntp_data)
return 0;
- nntp_data->unread = ctx->unread;
+ nntp_data->unread = ctx->mailbox->msg_unread;
nntp_acache_free(nntp_data);
if (!nntp_data->nserv || !nntp_data->nserv->groups_hash || !nntp_data->group)
else
#endif
{
- b->msg_unread = Context->unread;
+ b->msg_unread = Context->mailbox->msg_unread;
b->msg_count = Context->mailbox->msg_count;
}
b->msg_flagged = Context->flagged;
{
if (mutt_str_strcmp(np->b->realpath, ctx->mailbox->realpath) == 0)
{
- np->b->msg_unread = ctx->unread;
+ np->b->msg_unread = ctx->mailbox->msg_unread;
np->b->msg_count = ctx->mailbox->msg_count;
np->b->msg_flagged = ctx->flagged;
break;
if (!optional)
{
snprintf(fmt, sizeof(fmt), "%%%sd", prec);
- snprintf(buf, buflen, fmt, Context ? Context->unread - Context->new : 0);
+ snprintf(buf, buflen, fmt, Context ? Context->mailbox->msg_unread - Context->new : 0);
}
- else if (!Context || !(Context->unread - Context->new))
+ else if (!Context || !(Context->mailbox->msg_unread - Context->new))
optional = 0;
break;
case 'R':
{
- int read = Context ? Context->mailbox->msg_count - Context->unread : 0;
+ int read = Context ? Context->mailbox->msg_count - Context->mailbox->msg_unread : 0;
if (!optional)
{
if (!optional)
{
snprintf(fmt, sizeof(fmt), "%%%sd", prec);
- snprintf(buf, buflen, fmt, Context ? Context->unread : 0);
+ snprintf(buf, buflen, fmt, Context ? Context->mailbox->msg_unread : 0);
}
- else if (!Context || !Context->unread)
+ else if (!Context || !Context->mailbox->msg_unread)
optional = 0;
break;