/**
* mutt_check_traditional_pgp - Check if a message has inline PGP content
- * @param[in] e Header of message to check
+ * @param[in] el List of Emails to check
* @param[out] redraw Set of #REDRAW_FULL if the screen may need redrawing
* @retval true If message contains inline PGP content
*/
-bool mutt_check_traditional_pgp(struct Email *e, int *redraw)
+bool mutt_check_traditional_pgp(struct EmailList *el, int *redraw)
{
bool rc = false;
- if (e && !(e->security & PGP_TRADITIONAL_CHECKED))
- rc = check_traditional_pgp(e, redraw);
- else
+ struct EmailNode *en = NULL;
+ STAILQ_FOREACH(en, el, entries)
{
- for (int i = 0; i < Context->mailbox->msg_count; i++)
- {
- if (message_is_tagged(Context, i) &&
- !(Context->mailbox->emails[i]->security & PGP_TRADITIONAL_CHECKED))
- {
- rc = check_traditional_pgp(Context->mailbox->emails[i], redraw) || rc;
- }
- }
+ if (!(en->email->security & PGP_TRADITIONAL_CHECKED))
+ rc = check_traditional_pgp(en->email, redraw) || rc;
}
+
return rc;
}
if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
- mutt_check_traditional_pgp(tag ? NULL : CUR_EMAIL, &menu->redraw);
+ struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
+ el_add_tagged(&el, Context, CUR_EMAIL, tag);
+ mutt_check_traditional_pgp(&el, &menu->redraw);
+ el_free(&el);
}
int hint =
Context->mailbox->emails[Context->mailbox->v2r[menu->current]]->index;
if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
- mutt_check_traditional_pgp(tag ? NULL : CUR_EMAIL, &menu->redraw);
+ struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
+ el_add_tagged(&el, Context, CUR_EMAIL, tag);
+ mutt_check_traditional_pgp(&el, &menu->redraw);
+ el_free(&el);
}
struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
el_add_tagged(&el, Context, CUR_EMAIL, tag);
CHECK_ATTACH;
if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
- mutt_check_traditional_pgp(tag ? NULL : CUR_EMAIL, &menu->redraw);
+ struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
+ el_add_tagged(&el, Context, CUR_EMAIL, tag);
+ mutt_check_traditional_pgp(&el, &menu->redraw);
+ el_free(&el);
}
ci_send_message(SEND_FORWARD, NULL, NULL, Context, tag ? NULL : CUR_EMAIL);
menu->redraw = REDRAW_FULL;
CHECK_ATTACH;
if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
- mutt_check_traditional_pgp(tag ? NULL : CUR_EMAIL, &menu->redraw);
+ struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
+ el_add_tagged(&el, Context, CUR_EMAIL, tag);
+ mutt_check_traditional_pgp(&el, &menu->redraw);
+ el_free(&el);
}
ci_send_message(SEND_REPLY | SEND_GROUP_REPLY, NULL, NULL, Context,
tag ? NULL : CUR_EMAIL);
CHECK_VISIBLE;
if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
- mutt_check_traditional_pgp(tag ? NULL : CUR_EMAIL, &menu->redraw);
+ struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
+ el_add_tagged(&el, Context, CUR_EMAIL, tag);
+ mutt_check_traditional_pgp(&el, &menu->redraw);
+ el_free(&el);
}
ci_send_message(SEND_REPLY | SEND_LIST_REPLY, NULL, NULL, Context,
tag ? NULL : CUR_EMAIL);
CHECK_MSGCOUNT;
CHECK_VISIBLE;
if (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED))
- mutt_check_traditional_pgp(tag ? NULL : CUR_EMAIL, &menu->redraw);
+ {
+ struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
+ el_add_tagged(&el, Context, CUR_EMAIL, tag);
+ mutt_check_traditional_pgp(&el, &menu->redraw);
+ el_free(&el);
+ }
if (menu->menu == MENU_PAGER)
{
CHECK_VISIBLE;
if (PgpAutoDecode && (tag || !(CUR_EMAIL->security & PGP_TRADITIONAL_CHECKED)))
{
- mutt_check_traditional_pgp(tag ? NULL : CUR_EMAIL, &menu->redraw);
+ struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
+ el_add_tagged(&el, Context, CUR_EMAIL, tag);
+ mutt_check_traditional_pgp(&el, &menu->redraw);
+ el_free(&el);
}
ci_send_message(SEND_REPLY, NULL, NULL, Context, tag ? NULL : CUR_EMAIL);
menu->redraw = REDRAW_FULL;