100 {
N_(
"Exit"), OP_EXIT },
101 {
N_(
"Save"), OP_ATTACHMENT_SAVE },
102 {
N_(
"Pipe"), OP_PIPE },
103 {
N_(
"Print"), OP_ATTACHMENT_PRINT },
104 {
N_(
"Help"), OP_HELP },
154 char tmp[128] = { 0 };
189 const char *s =
"<no description>";
282 static const char dispchar[] = {
'I',
'A',
'F',
'-' };
329 return aptr->
num + 1;
375 char tmp[128] = { 0 };
409 const char *s = aptr->
body->
tagged ?
"*" :
" ";
423 const char *s = aptr->
tree;
445 const char *s = aptr->
body->
unlink ?
"-" :
" ";
516 if (ev_w->
win != win_menu)
541 struct Email *e, FILE *fp,
bool attach_msg)
543 if (!mv || !mv->
mailbox || !e || !fp)
641 { -1, -1, NULL, NULL },
struct AttachCtx * mutt_actx_new(void)
Create a new Attachment Context.
struct AttachPrivateData * attach_private_data_new(void)
Create new Attach Data.
Handling of email attachments.
@ ED_ATT_NUMBER
AttachPtr.num.
@ ED_ATT_TREE
AttachPtr.tree.
@ ED_ATT_CHARSET
AttachPtr.body.
void mutt_parse_mime_message(struct Email *e, FILE *fp)
Parse a MIME email.
Miscellaneous email parsing routines.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
size_t buf_copy(struct Buffer *dst, const struct Buffer *src)
Copy a Buffer's contents to another Buffer.
Color and attribute parsing.
@ MT_COLOR_TREE
Index: tree-drawing characters.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
const struct Expando * cs_subset_expando(const struct ConfigSubset *sub, const char *name)
Get an Expando config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
@ FR_DONE
Exit the Dialog.
@ FR_UNKNOWN
Unknown function.
@ FR_CONTINUE
Remain in the Dialog.
static const struct Mapping AttachmentHelp[]
Help Bar for the Attachment selection dialog.
const struct ExpandoRenderData AttachRenderData[]
Callbacks for Attachment Expandos.
@ ED_BODY
Body ED_BOD_ ExpandoDataBody.
@ ED_ATTACH
Attach ED_ATT_ ExpandoDataAttach.
char * mutt_body_get_charset(struct Body *b, char *buf, size_t buflen)
Get a body's character set.
@ ED_BOD_DESCRIPTION
Body.description.
@ ED_BOD_CHARSET_CONVERT
Body.type.
@ ED_BOD_DELETED
Body.deleted.
@ ED_BOD_UNLINK
Body.unlink.
@ ED_BOD_FILE_SIZE
Body.filename.
@ ED_BOD_DISPOSITION
Body.disposition.
@ ED_BOD_ATTACH_QUALIFIES
Body.attach_qualifies.
@ ED_BOD_MIME_MAJOR
Body.type, Body.xtype.
@ ED_BOD_TAGGED
Body.tagged.
@ ED_BOD_ATTACH_COUNT
Body.attach_count.
@ ED_BOD_FILE
Body.filename.
@ ED_BOD_MIME_MINOR
Body.subtype.
@ ED_BOD_FILE_DISPOSITION
Body.d_filename.
@ ED_BOD_MIME_ENCODING
Body.encoding.
Structs that make up an email.
bool mutt_is_message_type(int type, const char *subtype)
Determine if a mime type matches a message or not.
int expando_filter(const struct Expando *exp, const struct ExpandoRenderData *rdata, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Render an Expando and run the result through a filter.
long mutt_file_get_size(const char *path)
Get the size of a file.
int km_dokey(enum MenuType mtype, GetChFlags flags)
Determine what a keypress should do.
void km_error_key(enum MenuType mtype)
Handle an unbound key sequence.
int menu_tagging_dispatcher(struct MuttWindow *win, int op)
Perform tagging operations on the Menu - Implements function_dispatcher_t -.
int global_function_dispatcher(struct MuttWindow *win, int op)
Perform a Global function - Implements function_dispatcher_t -.
int attach_function_dispatcher(struct MuttWindow *win, int op)
Perform a Attach function - Implements function_dispatcher_t -.
int menu_function_dispatcher(struct MuttWindow *win, int op)
Perform a Menu function - Implements function_dispatcher_t -.
long attach_s_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Attachment: Size - Implements ExpandoRenderData::get_number() -.
long attach_u_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Attachment: Unlink flag - Implements ExpandoRenderData::get_number() -.
long attach_D_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Attachment: Deleted - Implements ExpandoRenderData::get_number() -.
long attach_Q_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Attachment: Attachment counting - Implements ExpandoRenderData::get_number() -.
long attach_t_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Attachment: Is Tagged - Implements ExpandoRenderData::get_number() -.
long attach_X_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Attachment: Number of MIME parts - Implements ExpandoRenderData::get_number() -.
long attach_n_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Attachment: Index number - Implements ExpandoRenderData::get_number() -.
void attach_C(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Charset - Implements ExpandoRenderData::get_string() -.
void attach_d(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Description - Implements ExpandoRenderData::get_string() -.
void attach_F(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Filename in header - Implements ExpandoRenderData::get_string() -.
void attach_m(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Major MIME type - Implements ExpandoRenderData::get_string() -.
void attach_T(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Tree characters - Implements ExpandoRenderData::get_string() -.
void attach_u(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Unlink flag - Implements ExpandoRenderData::get_string() -.
void attach_s(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Size - Implements ExpandoRenderData::get_string() -.
void attach_f(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Filename - Implements ExpandoRenderData::get_string() -.
void attach_c(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Requires conversion flag - Implements ExpandoRenderData::get_string() -.
void attach_Q(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Attachment counting - Implements ExpandoRenderData::get_string() -.
void attach_M(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: MIME subtype - Implements ExpandoRenderData::get_string() -.
void attach_t(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Is Tagged - Implements ExpandoRenderData::get_string() -.
void attach_D(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Deleted - Implements ExpandoRenderData::get_string() -.
void attach_I(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: Disposition flag - Implements ExpandoRenderData::get_string() -.
void attach_e(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Attachment: MIME type - Implements ExpandoRenderData::get_string() -.
void dlg_attachment(struct ConfigSubset *sub, struct MailboxView *mv, struct Email *e, FILE *fp, bool attach_msg)
Show the attachments in a Menu -.
#define mutt_debug(LEVEL,...)
static int attach_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
static int attach_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
Convenience wrapper for the gui headers.
void simple_dialog_free(struct MuttWindow **ptr)
Destroy a simple index Dialog.
struct SimpleDialogWindows simple_dialog_new(enum MenuType mtype, enum WindowType wtype, const struct Mapping *help_data)
Create a simple index Dialog.
int mutt_make_string(struct Buffer *buf, size_t max_cols, const struct Expando *exp, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
Create formatted strings using mailbox expandos.
String processing routines to generate the mail index.
void mutt_message_hook(struct Mailbox *m, struct Email *e, HookFlags type)
Perform a message hook.
Parse and execute user-defined hooks.
#define MUTT_MESSAGE_HOOK
message-hook: run before displaying a message
#define GETCH_NO_FLAGS
No flags are set.
@ LL_DEBUG5
Log at debug level 5.
@ LL_DEBUG1
Log at debug level 1.
@ TYPE_TEXT
Type: 'text/*'.
Convenience wrapper for the library headers.
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
struct MuttWindow * window_set_focus(struct MuttWindow *win)
Set the Window focus.
@ WT_DLG_ATTACHMENT
Attachment Dialog, dlg_attachment()
@ NT_WINDOW_DELETE
Window is about to be deleted.
bool mutt_is_text_part(const struct Body *b)
Is this part of an email in plain text?
void buf_pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
Some miscellaneous functions.
void node_expando_set_color(const struct ExpandoNode *node, int cid)
Set the colour for an Expando.
void node_expando_set_has_tree(const struct ExpandoNode *node, bool has_tree)
Set the has_tree flag for an Expando.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
const char * opcodes_get_name(int op)
Get the name of an opcode.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
void mutt_update_recvattach_menu(struct AttachCtx *actx, struct Menu *menu, bool init)
Update the Attachment Menu.
Routines for managing attachments.
#define MUTT_FORMAT_FORCESUBJ
Print the subject even if unchanged.
#define MUTT_FORMAT_ARROWCURSOR
Reserve space for arrow_cursor.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
#define MUTT_FORMAT_STAT_FILE
Used by attach_format_str.
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
FILE * fp_root
Used by recvattach for updating.
struct Email * email
Used by recvattach for updating.
struct AttachPtr ** idx
Array of attachments.
short * v2r
Mapping from virtual to real attachment.
Private state data for Attachments.
int op
Op returned from the Pager, e.g. OP_NEXT_ENTRY.
struct Menu * menu
Current Menu.
struct ConfigSubset * sub
Config subset.
struct AttachCtx * actx
List of all Attachments.
bool attach_msg
Are we in "attach message" mode?
struct Mailbox * mailbox
Current Mailbox.
An email to which things will be attached.
struct Body * body
Attachment.
char * tree
Tree characters to display.
int num
Attachment index number.
char * d_filename
filename to be used for the content-disposition header If NULL, filename is used instead.
signed short attach_count
Number of attachments.
bool deleted
Attachment marked for deletion.
bool noconv
Don't do character set conversion.
bool unlink
If true, filename should be unlink()ed before free()ing this structure.
LOFF_T length
length (in bytes) of attachment
struct AttachPtr * aptr
Menu information, used in recvattach.c.
struct Email * email
header information for message/rfc822
char * description
content-description
unsigned int disposition
content-disposition, ContentDisposition
bool attach_qualifies
This attachment should be counted.
bool tagged
This attachment is tagged.
char * subtype
content-type subtype
unsigned int encoding
content-transfer-encoding, ContentEncoding
unsigned int type
content-type primary type, ContentType
char * filename
When sending a message, this is the file to which this structure refers.
String manipulation buffer.
char * data
Pointer to data.
A set of inherited config items.
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
The envelope/body of an email.
const char * name
Name of config item that changed.
An Event that happened to a Window.
struct MuttWindow * win
Window that changed.
struct ExpandoNode * node
Parsed tree.
struct Mailbox * mailbox
Current Mailbox.
Mapping between user-readable string and a constant.
void * wdata
Private data.
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
Data passed to a notification function.
void * event_data
Data from notify_send()
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
void * global_data
Data from notify_observer_add()
Tuple for the results of simple_dialog_new()
struct MuttWindow * sbar
Simple Bar.
struct MuttWindow * dlg
Main Dialog Window.
@ MENU_ATTACHMENT
Select an attachment.