summaryrefslogtreecommitdiffstats
path: root/attach.h
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2017-08-10 18:18:22 -0700
committerKevin McCarthy <kevin@8t8.us>2017-08-10 18:18:22 -0700
commit4a76fadb3e8c7728468c32290663c5c92badc655 (patch)
treeeb7df3f1dcc5690202d471a81da067f16c9e5140 /attach.h
parent2fd6f99bea1337e1b490a9056033fe0151f22ddc (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.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/attach.h b/attach.h
index 80eed506..b95230bf 100644
--- a/attach.h
+++ b/attach.h
@@ -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);