NeoMutt  2022-04-29-215-gc12b98
Teaching an old dog new tricks
DOXYGEN
dlg_attach.c
Go to the documentation of this file.
1
69#include "config.h"
70#include <stdbool.h>
71#include <stdint.h>
72#include <stdio.h>
73#include "mutt/lib.h"
74#include "config/lib.h"
75#include "email/lib.h"
76#include "core/lib.h"
77#include "gui/lib.h"
78#include "menu/lib.h"
79#include "attach.h"
80#include "attachments.h"
81#include "format_flags.h"
82#include "functions.h"
83#include "hdrline.h"
84#include "hook.h"
85#include "keymap.h"
86#include "menu/type.h"
87#include "mutt_logging.h"
88#include "muttlib.h"
89#include "opcodes.h"
90#include "private_data.h"
91#include "recvattach.h"
92
94static const struct Mapping AttachHelp[] = {
95 // clang-format off
96 { N_("Exit"), OP_EXIT },
97 { N_("Save"), OP_ATTACHMENT_SAVE },
98 { N_("Pipe"), OP_PIPE },
99 { N_("Print"), OP_ATTACHMENT_PRINT },
100 { N_("Help"), OP_HELP },
101 { NULL, 0 },
102 // clang-format on
103};
104
111{
112 if (nc->event_type != NT_CONFIG)
113 return 0;
114 if (!nc->global_data || !nc->event_data)
115 return -1;
116
117 struct EventConfig *ev_c = nc->event_data;
118
119 if (!mutt_str_equal(ev_c->name, "attach_format") && !mutt_str_equal(ev_c->name, "message_format"))
120 return 0;
121
122 struct Menu *menu = nc->global_data;
124 mutt_debug(LL_DEBUG5, "config done, request WA_RECALC, MENU_REDRAW_FULL\n");
125
126 return 0;
127}
128
152const char *attach_format_str(char *buf, size_t buflen, size_t col, int cols, char op,
153 const char *src, const char *prec, const char *if_str,
154 const char *else_str, intptr_t data, MuttFormatFlags flags)
155{
156 char fmt[128] = { 0 };
157 char charset[128] = { 0 };
158 struct AttachPtr *aptr = (struct AttachPtr *) data;
159 bool optional = (flags & MUTT_FORMAT_OPTIONAL);
160
161 switch (op)
162 {
163 case 'C':
164 if (!optional)
165 {
166 if (mutt_is_text_part(aptr->body) &&
167 mutt_body_get_charset(aptr->body, charset, sizeof(charset)))
168 {
169 mutt_format_s(buf, buflen, prec, charset);
170 }
171 else
172 mutt_format_s(buf, buflen, prec, "");
173 }
174 else if (!mutt_is_text_part(aptr->body) ||
175 !mutt_body_get_charset(aptr->body, charset, sizeof(charset)))
176 {
177 optional = false;
178 }
179 break;
180 case 'c':
181 /* XXX */
182 if (!optional)
183 {
184 snprintf(fmt, sizeof(fmt), "%%%sc", prec);
185 snprintf(buf, buflen, fmt,
186 ((aptr->body->type != TYPE_TEXT) || aptr->body->noconv) ? 'n' : 'c');
187 }
188 else if ((aptr->body->type != TYPE_TEXT) || aptr->body->noconv)
189 optional = false;
190 break;
191 case 'd':
192 {
193 const char *const c_message_format = cs_subset_string(NeoMutt->sub, "message_format");
194 if (!optional)
195 {
196 if (aptr->body->description)
197 {
198 mutt_format_s(buf, buflen, prec, aptr->body->description);
199 break;
200 }
201 if (mutt_is_message_type(aptr->body->type, aptr->body->subtype) &&
202 c_message_format && aptr->body->email)
203 {
204 char s[128] = { 0 };
205 mutt_make_string(s, sizeof(s), cols, c_message_format, NULL, -1,
206 aptr->body->email,
208 if (*s)
209 {
210 mutt_format_s(buf, buflen, prec, s);
211 break;
212 }
213 }
214 if (!aptr->body->d_filename && !aptr->body->filename)
215 {
216 mutt_format_s(buf, buflen, prec, "<no description>");
217 break;
218 }
219 }
220 else if (aptr->body->description ||
221 (mutt_is_message_type(aptr->body->type, aptr->body->subtype) &&
222 c_message_format && aptr->body->email))
223 {
224 break;
225 }
226 }
227 /* fallthrough */
228 case 'F':
229 if (!optional)
230 {
231 if (aptr->body->d_filename)
232 {
233 mutt_format_s(buf, buflen, prec, aptr->body->d_filename);
234 break;
235 }
236 }
237 else if (!aptr->body->d_filename && !aptr->body->filename)
238 {
239 optional = false;
240 break;
241 }
242 /* fallthrough */
243 case 'f':
244 if (!optional)
245 {
246 if (aptr->body->filename && (*aptr->body->filename == '/'))
247 {
248 struct Buffer *path = mutt_buffer_pool_get();
249
250 mutt_buffer_strcpy(path, aptr->body->filename);
252 mutt_format_s(buf, buflen, prec, mutt_buffer_string(path));
254 }
255 else
256 mutt_format_s(buf, buflen, prec, NONULL(aptr->body->filename));
257 }
258 else if (!aptr->body->filename)
259 optional = false;
260 break;
261 case 'D':
262 if (!optional)
263 snprintf(buf, buflen, "%c", aptr->body->deleted ? 'D' : ' ');
264 else if (!aptr->body->deleted)
265 optional = false;
266 break;
267 case 'e':
268 if (!optional)
269 mutt_format_s(buf, buflen, prec, ENCODING(aptr->body->encoding));
270 break;
271 case 'I':
272 if (optional)
273 break;
274
275 const char dispchar[] = { 'I', 'A', 'F', '-' };
276 char ch;
277
278 if (aptr->body->disposition < sizeof(dispchar))
279 ch = dispchar[aptr->body->disposition];
280 else
281 {
282 mutt_debug(LL_DEBUG1, "ERROR: invalid content-disposition %d\n",
283 aptr->body->disposition);
284 ch = '!';
285 }
286 snprintf(buf, buflen, "%c", ch);
287 break;
288 case 'm':
289 if (!optional)
290 mutt_format_s(buf, buflen, prec, TYPE(aptr->body));
291 break;
292 case 'M':
293 if (!optional)
294 mutt_format_s(buf, buflen, prec, aptr->body->subtype);
295 else if (!aptr->body->subtype)
296 optional = false;
297 break;
298 case 'n':
299 if (optional)
300 break;
301
302 snprintf(fmt, sizeof(fmt), "%%%sd", prec);
303 snprintf(buf, buflen, fmt, aptr->num + 1);
304 break;
305 case 'Q':
306 if (optional)
307 optional = aptr->body->attach_qualifies;
308 else
309 {
310 snprintf(fmt, sizeof(fmt), "%%%sc", prec);
311 mutt_format_s(buf, buflen, fmt, "Q");
312 }
313 break;
314 case 's':
315 {
316 size_t l = 0;
317 if (aptr->body->filename && (flags & MUTT_FORMAT_STAT_FILE))
318 {
319 l = mutt_file_get_size(aptr->body->filename);
320 }
321 else
322 l = aptr->body->length;
323
324 if (!optional)
325 {
326 char tmp[128] = { 0 };
327 mutt_str_pretty_size(tmp, sizeof(tmp), l);
328 mutt_format_s(buf, buflen, prec, tmp);
329 }
330 else if (l == 0)
331 optional = false;
332
333 break;
334 }
335 case 't':
336 if (!optional)
337 snprintf(buf, buflen, "%c", aptr->body->tagged ? '*' : ' ');
338 else if (!aptr->body->tagged)
339 optional = false;
340 break;
341 case 'T':
342 if (!optional)
343 mutt_format_s_tree(buf, buflen, prec, NONULL(aptr->tree));
344 else if (!aptr->tree)
345 optional = false;
346 break;
347 case 'u':
348 if (!optional)
349 snprintf(buf, buflen, "%c", aptr->body->unlink ? '-' : ' ');
350 else if (!aptr->body->unlink)
351 optional = false;
352 break;
353 case 'X':
354 if (optional)
355 optional = ((aptr->body->attach_count + aptr->body->attach_qualifies) != 0);
356 else
357 {
358 snprintf(fmt, sizeof(fmt), "%%%sd", prec);
359 snprintf(buf, buflen, fmt, aptr->body->attach_count + aptr->body->attach_qualifies);
360 }
361 break;
362 default:
363 *buf = '\0';
364 }
365
366 if (optional)
367 {
368 mutt_expando_format(buf, buflen, col, cols, if_str, attach_format_str, data,
370 }
371 else if (flags & MUTT_FORMAT_OPTIONAL)
372 {
373 mutt_expando_format(buf, buflen, col, cols, else_str, attach_format_str,
375 }
376
377 /* We return the format string, unchanged */
378 return src;
379}
380
386static void attach_make_entry(struct Menu *menu, char *buf, size_t buflen, int line)
387{
388 struct AttachPrivateData *priv = menu->mdata;
389 struct AttachCtx *actx = priv->actx;
390
391 const char *const c_attach_format = cs_subset_string(NeoMutt->sub, "attach_format");
392 mutt_expando_format(buf, buflen, 0, menu->win->state.cols, NONULL(c_attach_format),
393 attach_format_str, (intptr_t) (actx->idx[actx->v2r[line]]),
395}
396
400static int attach_tag(struct Menu *menu, int sel, int act)
401{
402 struct AttachPrivateData *priv = menu->mdata;
403 struct AttachCtx *actx = priv->actx;
404
405 struct Body *cur = actx->idx[actx->v2r[sel]]->body;
406 bool ot = cur->tagged;
407
408 cur->tagged = ((act >= 0) ? act : !cur->tagged);
409 return cur->tagged - ot;
410}
411
420{
421 if (nc->event_type != NT_WINDOW)
422 return 0;
423 if (!nc->global_data || !nc->event_data)
424 return -1;
426 return 0;
427
428 struct MuttWindow *win_menu = nc->global_data;
429 struct EventWindow *ev_w = nc->event_data;
430 if (ev_w->win != win_menu)
431 return 0;
432
433 struct Menu *menu = win_menu->wdata;
434
437
438 mutt_debug(LL_DEBUG5, "window delete done\n");
439 return 0;
440}
441
450 struct Email *e, FILE *fp)
451{
452 if (!m || !e || !fp)
453 return;
454
455 /* make sure we have parsed this message */
458
460 struct Menu *menu = dlg->wdata;
462 menu->tag = attach_tag;
463
464 struct AttachCtx *actx = mutt_actx_new();
465 actx->email = e;
466 actx->fp_root = fp;
467 mutt_update_recvattach_menu(actx, menu, true);
468
470 priv->menu = menu;
471 priv->actx = actx;
472 priv->sub = sub;
473 priv->mailbox = m;
474 menu->mdata = priv;
476
477 // NT_COLOR is handled by the SimpleDialog
480
481 struct MuttWindow *sbar = window_find_child(dlg, WT_STATUS_BAR);
482 sbar_set_title(sbar, _("Attachments"));
483
484 // ---------------------------------------------------------------------------
485 // Event Loop
486 int rc = 0;
487 int op = OP_NULL;
488 do
489 {
490 menu_tagging_dispatcher(menu->win, op);
491 window_redraw(NULL);
492
493 op = km_dokey(MENU_ATTACH);
494 mutt_debug(LL_DEBUG1, "Got op %s (%d)\n", opcodes_get_name(op), op);
495 if (op < 0)
496 continue;
497 if (op == OP_NULL)
498 {
500 continue;
501 }
503
504 rc = attach_function_dispatcher(dlg, op);
505 if (rc == FR_UNKNOWN)
506 rc = menu_function_dispatcher(menu->win, op);
507 if (rc == FR_UNKNOWN)
508 rc = global_function_dispatcher(NULL, op);
509
510 if (rc == FR_CONTINUE)
511 {
512 op = priv->op;
513 }
514
515 } while (rc != FR_DONE);
516 // ---------------------------------------------------------------------------
517
518 simple_dialog_free(&dlg);
519}
struct AttachCtx * mutt_actx_new(void)
Create a new Attachment Context.
Definition: attach.c:189
struct AttachPrivateData * attach_private_data_new(void)
Create new Attach Data.
Definition: private_data.c:52
Handling of email attachments.
void mutt_parse_mime_message(struct Email *e, FILE *fp)
Parse a MIME email.
Definition: attachments.c:591
Miscellaneous email parsing routines.
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Definition: buffer.c:327
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:77
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Definition: helpers.c:317
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
void mutt_format_s_tree(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string with tree characters.
Definition: curs_lib.c:805
void mutt_format_s(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string.
Definition: curs_lib.c:793
@ FR_DONE
Exit the Dialog.
Definition: dispatcher.h:35
@ FR_UNKNOWN
Unknown function.
Definition: dispatcher.h:33
@ FR_CONTINUE
Remain in the Dialog.
Definition: dispatcher.h:34
void dlg_select_attachment(struct ConfigSubset *sub, struct Mailbox *m, struct Email *e, FILE *fp)
Show the attachments in a Menu.
Definition: dlg_attach.c:449
static const struct Mapping AttachHelp[]
Help Bar for the Attachment selection dialog.
Definition: dlg_attach.c:94
char * mutt_body_get_charset(struct Body *b, char *buf, size_t buflen)
Get a body's character set.
Definition: body.c:131
Structs that make up an email.
long mutt_file_get_size(const char *path)
Get the size of a file.
Definition: file.c:1551
Flags to control mutt_expando_format()
#define MUTT_FORMAT_FORCESUBJ
Print the subject even if unchanged.
Definition: format_flags.h:31
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
Definition: format_flags.h:30
#define MUTT_FORMAT_OPTIONAL
Allow optional field processing.
Definition: format_flags.h:33
#define MUTT_FORMAT_ARROWCURSOR
Reserve space for arrow_cursor.
Definition: format_flags.h:35
uint8_t MuttFormatFlags
Flags for mutt_expando_format(), e.g. MUTT_FORMAT_FORCESUBJ.
Definition: format_flags.h:29
#define MUTT_FORMAT_STAT_FILE
Used by attach_format_str.
Definition: format_flags.h:34
int menu_tagging_dispatcher(struct MuttWindow *win, int op)
Perform tagging operations on the Menu - Implements function_dispatcher_t -.
Definition: tagging.c:223
int global_function_dispatcher(struct MuttWindow *win, int op)
Perform a Global function - Implements function_dispatcher_t -.
Definition: global.c:164
int attach_function_dispatcher(struct MuttWindow *win, int op)
Perform a Attach function - Implements function_dispatcher_t -.
Definition: functions.c:641
int menu_function_dispatcher(struct MuttWindow *win, int op)
Perform a Menu function - Implements function_dispatcher_t -.
Definition: functions.c:320
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t callback, intptr_t data, MuttFormatFlags flags)
Expand expandos (x) in a string -.
Definition: muttlib.c:777
const char * attach_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, intptr_t data, MuttFormatFlags flags)
Format a string for the attachment menu - Implements format_t -.
Definition: dlg_attach.c:152
#define mutt_debug(LEVEL,...)
Definition: logging.h:84
static void attach_make_entry(struct Menu *menu, char *buf, size_t buflen, int line)
Format a menu item for the attachment list - Implements Menu::make_entry() -.
Definition: dlg_attach.c:386
void attach_private_data_free(struct Menu *menu, void **ptr)
Free Attach Data - Implements Menu::mdata_free() -.
Definition: private_data.c:38
static int attach_tag(struct Menu *menu, int sel, int act)
Tag an attachment - Implements Menu::tag() -.
Definition: dlg_attach.c:400
static int attach_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
Definition: dlg_attach.c:110
static int attach_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
Definition: dlg_attach.c:419
Convenience wrapper for the gui headers.
void simple_dialog_free(struct MuttWindow **ptr)
Destroy a simple index Dialog.
Definition: simple.c:166
struct MuttWindow * simple_dialog_new(enum MenuType mtype, enum WindowType wtype, const struct Mapping *help_data)
Create a simple index Dialog.
Definition: simple.c:129
void mutt_make_string(char *buf, size_t buflen, int cols, const char *s, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
Create formatted strings using mailbox expandos.
Definition: hdrline.c:1405
String processing routines to generate the mail index.
void mutt_message_hook(struct Mailbox *m, struct Email *e, HookFlags type)
Perform a message hook.
Definition: hook.c:658
Parse and execute user-defined hooks.
#define MUTT_MESSAGE_HOOK
message-hook: run before displaying a message
Definition: hook.h:45
int km_dokey(enum MenuType mtype)
Determine what a keypress should do.
Definition: keymap.c:795
void km_error_key(enum MenuType mtype)
Handle an unbound key sequence.
Definition: keymap.c:1061
Manage keymappings.
@ LL_DEBUG5
Log at debug level 5.
Definition: logging.h:44
@ LL_DEBUG1
Log at debug level 1.
Definition: logging.h:40
GUI present the user with a selectable list.
#define MENU_REDRAW_FULL
Redraw everything.
Definition: lib.h:59
void menu_queue_redraw(struct Menu *menu, MenuRedrawFlags redraw)
Queue a request for a redraw.
Definition: menu.c:178
@ TYPE_TEXT
Type: 'text/*'.
Definition: mime.h:38
#define ENCODING(x)
Definition: mime.h:92
#define TYPE(body)
Definition: mime.h:89
Convenience wrapper for the library headers.
#define N_(a)
Definition: message.h:32
#define _(a)
Definition: message.h:28
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
Definition: notify.c:228
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
Definition: notify.c:189
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:807
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
Definition: mutt_logging.c:74
NeoMutt Logging.
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
Definition: mutt_window.c:604
struct MuttWindow * window_find_child(struct MuttWindow *win, enum WindowType type)
Recursively find a child Window of a given type.
Definition: mutt_window.c:522
@ WT_STATUS_BAR
Status Bar containing extra info about the Index/Pager/etc.
Definition: mutt_window.h:102
@ WT_DLG_ATTACH
Attach Dialog, dlg_select_attachment()
Definition: mutt_window.h:78
@ NT_WINDOW_DELETE
Window is about to be deleted.
Definition: mutt_window.h:206
void mutt_buffer_pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
Definition: muttlib.c:599
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
Definition: muttlib.c:1673
bool mutt_is_text_part(struct Body *b)
Is this part of an email in plain text?
Definition: muttlib.c:433
Some miscellaneous functions.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
Definition: notify_type.h:55
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
Definition: notify_type.h:43
const char * opcodes_get_name(int op)
Get the name of an opcode.
Definition: opcodes.c:46
All user-callable functions.
Private state data for the Pager.
bool mutt_is_message_type(int type, const char *subtype)
Determine if a mime type matches a message or not.
Definition: parse.c:1442
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
Definition: pool.c:112
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
Definition: pool.c:101
void mutt_update_recvattach_menu(struct AttachCtx *actx, struct Menu *menu, bool init)
Update the Attachment Menu.
Definition: recvattach.c:1192
Routines for managing attachments.
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
Definition: sbar.c:224
Sidebar functions.
#define NONULL(x)
Definition: string2.h:37
A set of attachments.
Definition: attach.h:51
FILE * fp_root
Used by recvattach for updating.
Definition: attach.h:53
struct Email * email
Used by recvattach for updating.
Definition: attach.h:52
struct AttachPtr ** idx
Array of attachments.
Definition: attach.h:55
short * v2r
Mapping from virtual to real attachment.
Definition: attach.h:59
Private state data for Attachments.
Definition: private_data.h:34
int op
Op returned from the Pager, e.g. OP_NEXT_ENTRY.
Definition: private_data.h:39
struct Menu * menu
Current Menu.
Definition: private_data.h:35
struct ConfigSubset * sub
Config subset.
Definition: private_data.h:37
struct AttachCtx * actx
List of all Attachments.
Definition: private_data.h:36
struct Mailbox * mailbox
Current Mailbox.
Definition: private_data.h:38
An email to which things will be attached.
Definition: attach.h:35
struct Body * body
Attachment.
Definition: attach.h:36
char * tree
Tree characters to display.
Definition: attach.h:39
int num
Attachment index number.
Definition: attach.h:41
The body of an email.
Definition: body.h:36
char * d_filename
filename to be used for the content-disposition header If NULL, filename is used instead.
Definition: body.h:56
signed short attach_count
Number of attachments.
Definition: body.h:90
bool deleted
Attachment marked for deletion.
Definition: body.h:87
bool noconv
Don't do character set conversion.
Definition: body.h:46
bool unlink
If true, filename should be unlink()ed before free()ing this structure.
Definition: body.h:67
LOFF_T length
length (in bytes) of attachment
Definition: body.h:53
struct Email * email
header information for message/rfc822
Definition: body.h:73
char * description
content-description
Definition: body.h:55
unsigned int disposition
content-disposition, ContentDisposition
Definition: body.h:42
bool attach_qualifies
This attachment should be counted.
Definition: body.h:86
bool tagged
This attachment is tagged.
Definition: body.h:89
char * subtype
content-type subtype
Definition: body.h:60
unsigned int encoding
content-transfer-encoding, ContentEncoding
Definition: body.h:41
unsigned int type
content-type primary type, ContentType
Definition: body.h:40
char * filename
When sending a message, this is the file to which this structure refers.
Definition: body.h:58
String manipulation buffer.
Definition: buffer.h:34
char * data
Pointer to data.
Definition: buffer.h:35
A set of inherited config items.
Definition: subset.h:47
The envelope/body of an email.
Definition: email.h:37
A config-change event.
Definition: subset.h:70
const char * name
Name of config item that changed.
Definition: subset.h:72
An Event that happened to a Window.
Definition: mutt_window.h:216
struct MuttWindow * win
Window that changed.
Definition: mutt_window.h:217
A mailbox.
Definition: mailbox.h:79
Mapping between user-readable string and a constant.
Definition: mapping.h:32
Definition: lib.h:69
struct MuttWindow * win
Window holding the Menu.
Definition: lib.h:76
void(* make_entry)(struct Menu *menu, char *buf, size_t buflen, int line)
Definition: lib.h:96
void(* mdata_free)(struct Menu *menu, void **ptr)
Definition: lib.h:152
int(* tag)(struct Menu *menu, int sel, int act)
Definition: lib.h:121
struct ConfigSubset * sub
Inherited config items.
Definition: lib.h:77
void * mdata
Private data.
Definition: lib.h:137
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:127
void * wdata
Private data.
Definition: mutt_window.h:145
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Definition: mutt_window.h:138
Container for Accounts, Notifications.
Definition: neomutt.h:37
struct Notify * notify
Notifications handler.
Definition: neomutt.h:38
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
Data passed to a notification function.
Definition: observer.h:34
void * event_data
Data from notify_send()
Definition: observer.h:38
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
Definition: observer.h:36
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:37
void * global_data
Data from notify_observer_add()
Definition: observer.h:39
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:60
Menu types.
@ MENU_ATTACH
Select an attachment.
Definition: type.h:38