int tagged; /**< how many messages are tagged? */
int new; /**< how many new messages? */
int deleted; /**< how many deleted messages */
- int flagged; /**< how many flagged messages */
int msgnotreadyet; /**< which msg "new" in pager, -1 if none */
struct Menu *menu; /**< needed for pattern compilation */
bool changed = h->changed;
int deleted = ctx->deleted;
int tagged = ctx->tagged;
- int flagged = ctx->flagged;
+ int mailbox = ctx->mailbox->msg_flagged;
int update = false;
if (ctx->readonly && flag != MUTT_TAG)
update = true;
h->flagged = bf;
if (upd_ctx)
- ctx->flagged++;
+ ctx->mailbox->msg_flagged++;
h->changed = true;
if (upd_ctx)
ctx->changed = true;
update = true;
h->flagged = false;
if (upd_ctx)
- ctx->flagged--;
+ ctx->mailbox->msg_flagged--;
h->changed = true;
if (upd_ctx)
ctx->changed = true;
* of this message and not what it was at the time it was last searched.
*/
if (h->searched && (changed != h->changed || deleted != ctx->deleted ||
- tagged != ctx->tagged || flagged != ctx->flagged))
+ tagged != ctx->tagged || mailbox != ctx->mailbox->msg_flagged))
{
h->searched = false;
}
{
mailbox->msg_count = ctx->mailbox->msg_count;
mailbox->msg_unread = ctx->mailbox->msg_unread;
- mailbox->msg_flagged = ctx->flagged;
+ mailbox->msg_flagged = ctx->mailbox->msg_flagged;
mailbox->stats_last_checked = ctx->mtime;
mx_mbox_close(&ctx, NULL);
}
ctx->deleted = 0;
ctx->new = 0;
ctx->mailbox->msg_unread = 0;
- ctx->flagged = 0;
+ ctx->mailbox->msg_flagged = 0;
ctx->changed = false;
ctx->id_hash = NULL;
ctx->subj_hash = NULL;
if (ctx->hdrs[i]->deleted && !ctx->hdrs[i]->read)
ctx->mailbox->msg_unread--;
if (ctx->hdrs[i]->deleted && ctx->hdrs[i]->flagged)
- ctx->flagged--;
+ ctx->mailbox->msg_flagged--;
}
ctx->mailbox->msg_count -= ctx->deleted;
mutt_sb_set_mailbox_stats(ctx);
ctx->new = 0;
ctx->mailbox->msg_unread = 0;
ctx->changed = false;
- ctx->flagged = 0;
+ ctx->mailbox->msg_flagged = 0;
padding = mx_msg_padding_size(ctx);
for (i = 0, j = 0; i < ctx->mailbox->msg_count; i++)
{
if (ctx->hdrs[j]->tagged)
ctx->tagged++;
if (ctx->hdrs[j]->flagged)
- ctx->flagged++;
+ ctx->mailbox->msg_flagged++;
if (!ctx->hdrs[j]->read)
{
ctx->mailbox->msg_unread++;
if (h->changed)
ctx->changed = true;
if (h->flagged)
- ctx->flagged++;
+ ctx->mailbox->msg_flagged++;
if (h->deleted)
ctx->deleted++;
if (!h->read)
ctx->deleted = 0;
ctx->new = 0;
ctx->mailbox->msg_unread = 0;
- ctx->flagged = 0;
+ ctx->mailbox->msg_flagged = 0;
ctx->changed = false;
ctx->id_hash = NULL;
ctx->subj_hash = NULL;
b->msg_unread = Context->mailbox->msg_unread;
b->msg_count = Context->mailbox->msg_count;
}
- b->msg_flagged = Context->flagged;
+ b->msg_flagged = Context->mailbox->msg_flagged;
}
/* compute length of Folder without trailing separator */
{
np->b->msg_unread = ctx->mailbox->msg_unread;
np->b->msg_count = ctx->mailbox->msg_count;
- np->b->msg_flagged = ctx->flagged;
+ np->b->msg_flagged = ctx->mailbox->msg_flagged;
break;
}
}
if (!optional)
{
snprintf(fmt, sizeof(fmt), "%%%sd", prec);
- snprintf(buf, buflen, fmt, Context ? Context->flagged : 0);
+ snprintf(buf, buflen, fmt, Context ? Context->mailbox->msg_flagged : 0);
}
- else if (!Context || !Context->flagged)
+ else if (!Context || !Context->mailbox->msg_flagged)
optional = 0;
break;