diff options
author | Kevin McCarthy <kevin@8t8.us> | 2017-08-10 18:18:22 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2017-08-10 18:18:22 -0700 |
commit | 4a76fadb3e8c7728468c32290663c5c92badc655 (patch) | |
tree | eb7df3f1dcc5690202d471a81da067f16c9e5140 /attach.h | |
parent | 2fd6f99bea1337e1b490a9056033fe0151f22ddc (diff) |
Add virtual index to actx. (see #3728)
The virtual index is modeled after the CONTEXT. Add a CURATTACH
helper to reduce code verbosity. Store the actx as menu->data.
Simplify and consolidate the recvattach and compose menu update code
inside a function.
Because compose and recvattach share so much code, change compose to
use the virtual index even though it has no collapse/expand
functionality.
Diffstat (limited to 'attach.h')
-rw-r--r-- | attach.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -44,6 +44,9 @@ typedef struct attach_ctx short idxlen; short idxmax; + short *v2r; /* mapping from virtual to real attachment */ + short vcount; /* the number of virtual attachments */ + FILE **fp_idx; /* Extra FILE* used for decryption */ short fp_len; short fp_max; @@ -72,7 +75,7 @@ void mutt_attach_resend (FILE *, HEADER *, ATTACH_CONTEXT *, BODY *); void mutt_attach_forward (FILE *, HEADER *, ATTACH_CONTEXT *, BODY *); void mutt_attach_reply (FILE *, HEADER *, ATTACH_CONTEXT *, BODY *, int); -void mutt_actx_add_attach (ATTACH_CONTEXT *actx, ATTACHPTR *attach, MUTTMENU *menu); +void mutt_actx_add_attach (ATTACH_CONTEXT *actx, ATTACHPTR *attach); void mutt_actx_add_fp (ATTACH_CONTEXT *actx, FILE *new_fp); void mutt_actx_add_body (ATTACH_CONTEXT *actx, BODY *new_body); void mutt_actx_free_entries (ATTACH_CONTEXT *actx); |