NeoMutt  2024-11-14-138-ge5ca67
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
expando_status.c
Go to the documentation of this file.
1
35#include "config.h"
36#include <stdbool.h>
37#include <stdio.h>
38#include <sys/types.h>
39#include "mutt/lib.h"
40#include "config/lib.h"
41#include "email/lib.h"
42#include "core/lib.h"
43#include "expando_status.h"
44#include "expando/lib.h"
45#include "menu/lib.h"
46#include "postpone/lib.h"
47#include "globals.h"
48#include "init.h"
49#include "mutt_mailbox.h"
50#include "mutt_thread.h"
51#include "muttlib.h"
52#include "mview.h"
53#include "shared_data.h"
54
55static void index_mailbox_path(const struct ExpandoNode *node, void *data,
56 MuttFormatFlags flags, struct Buffer *buf);
57
65static char *get_sort_str(char *buf, size_t buflen, enum EmailSortType method)
66{
67 snprintf(buf, buflen, "%s%s%s", (method & SORT_REVERSE) ? "reverse-" : "",
68 (method & SORT_LAST) ? "last-" : "",
70 return buf;
71}
72
76static void global_config_sort(const struct ExpandoNode *node, void *data,
77 MuttFormatFlags flags, struct Buffer *buf)
78{
79 char tmp[128] = { 0 };
80
81 const enum EmailSortType c_sort = cs_subset_sort(NeoMutt->sub, "sort");
82 const char *s = get_sort_str(tmp, sizeof(tmp), c_sort);
83 buf_strcpy(buf, s);
84}
85
89static void global_config_sort_aux(const struct ExpandoNode *node, void *data,
90 MuttFormatFlags flags, struct Buffer *buf)
91{
92 char tmp[128] = { 0 };
93
94 const enum EmailSortType c_sort_aux = cs_subset_sort(NeoMutt->sub, "sort_aux");
95 const char *s = get_sort_str(tmp, sizeof(tmp), c_sort_aux);
96 buf_strcpy(buf, s);
97}
98
102static void global_config_use_threads(const struct ExpandoNode *node, void *data,
103 MuttFormatFlags flags, struct Buffer *buf)
104{
105 const enum UseThreads c_use_threads = mutt_thread_style();
106 const char *s = get_use_threads_str(c_use_threads);
107 buf_strcpy(buf, s);
108}
109
113static void global_hostname(const struct ExpandoNode *node, void *data,
114 MuttFormatFlags flags, struct Buffer *buf)
115{
116 const char *s = ShortHostname;
117 buf_strcpy(buf, s);
118}
119
123static void global_version(const struct ExpandoNode *node, void *data,
124 MuttFormatFlags flags, struct Buffer *buf)
125{
126 const char *s = mutt_make_version();
127 buf_strcpy(buf, s);
128}
129
133static long index_deleted_count_num(const struct ExpandoNode *node, void *data,
134 MuttFormatFlags flags)
135{
136 const struct MenuStatusLineData *msld = data;
137 const struct IndexSharedData *shared = msld->shared;
138 const struct Mailbox *m = shared->mailbox;
139
140 return m ? m->msg_deleted : 0;
141}
142
146static void index_description(const struct ExpandoNode *node, void *data,
147 MuttFormatFlags flags, struct Buffer *buf)
148{
149 const struct MenuStatusLineData *msld = data;
150 const struct IndexSharedData *shared = msld->shared;
151 const struct Mailbox *m = shared->mailbox;
152
153 // If there's a descriptive name, use it. Otherwise, use %f
154 if (m && m->name)
155 {
156 const char *s = m->name;
157 buf_strcpy(buf, s);
158 return;
159 }
160
161 index_mailbox_path(node, data, flags, buf);
162}
163
167static long index_flagged_count_num(const struct ExpandoNode *node, void *data,
168 MuttFormatFlags flags)
169{
170 const struct MenuStatusLineData *msld = data;
171 const struct IndexSharedData *shared = msld->shared;
172 const struct Mailbox *m = shared->mailbox;
173
174 return m ? m->msg_flagged : 0;
175}
176
180static long index_limit_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
181{
182 const struct MenuStatusLineData *msld = data;
183 const struct IndexSharedData *shared = msld->shared;
184 const struct Mailbox *m = shared->mailbox;
185
186 return m ? m->vcount : 0;
187}
188
192static void index_limit_pattern(const struct ExpandoNode *node, void *data,
193 MuttFormatFlags flags, struct Buffer *buf)
194{
195 const struct MenuStatusLineData *msld = data;
196 const struct IndexSharedData *shared = msld->shared;
197 const struct MailboxView *mailbox_view = shared->mailbox_view;
198
199 const char *s = mview_has_limit(mailbox_view) ? mailbox_view->pattern : "";
200 buf_strcpy(buf, s);
201}
202
206static void index_limit_size(const struct ExpandoNode *node, void *data,
207 MuttFormatFlags flags, struct Buffer *buf)
208{
209 const struct MenuStatusLineData *msld = data;
210 const struct IndexSharedData *shared = msld->shared;
211 const struct MailboxView *mailbox_view = shared->mailbox_view;
212
213 char tmp[128] = { 0 };
214
215 const off_t num = mailbox_view ? mailbox_view->vsize : 0;
216 mutt_str_pretty_size(tmp, sizeof(tmp), num);
217 buf_strcpy(buf, tmp);
218}
219
223static long index_limit_size_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
224{
225 const struct MenuStatusLineData *msld = data;
226 const struct IndexSharedData *shared = msld->shared;
227 const struct MailboxView *mailbox_view = shared->mailbox_view;
228 if (!mailbox_view)
229 return 0;
230
231 return mailbox_view->vsize;
232}
233
237static void index_mailbox_path(const struct ExpandoNode *node, void *data,
238 MuttFormatFlags flags, struct Buffer *buf)
239{
240 const struct MenuStatusLineData *msld = data;
241 const struct IndexSharedData *shared = msld->shared;
242 const struct Mailbox *m = shared->mailbox;
243
244 char tmp[128] = { 0 };
245
246 if (m && m->compress_info && (m->realpath[0] != '\0'))
247 {
248 mutt_str_copy(tmp, m->realpath, sizeof(tmp));
249 mutt_pretty_mailbox(tmp, sizeof(tmp));
250 }
251 else if (m && (m->type == MUTT_NOTMUCH) && m->name)
252 {
253 mutt_str_copy(tmp, m->name, sizeof(tmp));
254 }
255 else if (m && !buf_is_empty(&m->pathbuf))
256 {
257 mutt_str_copy(tmp, mailbox_path(m), sizeof(tmp));
258 mutt_pretty_mailbox(tmp, sizeof(tmp));
259 }
260 else
261 {
262 mutt_str_copy(tmp, _("(no mailbox)"), sizeof(tmp));
263 }
264
265 buf_strcpy(buf, tmp);
266}
267
271static void index_mailbox_size(const struct ExpandoNode *node, void *data,
272 MuttFormatFlags flags, struct Buffer *buf)
273{
274 const struct MenuStatusLineData *msld = data;
275 const struct IndexSharedData *shared = msld->shared;
276 const struct Mailbox *m = shared->mailbox;
277
278 char tmp[128] = { 0 };
279
280 const off_t num = m ? m->size : 0;
281 mutt_str_pretty_size(tmp, sizeof(tmp), num);
282 buf_strcpy(buf, tmp);
283}
284
288static long index_mailbox_size_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
289{
290 const struct MenuStatusLineData *msld = data;
291 const struct IndexSharedData *shared = msld->shared;
292 const struct Mailbox *m = shared->mailbox;
293 if (!m)
294 return 0;
295
296 return m->size;
297}
298
302static long index_message_count_num(const struct ExpandoNode *node, void *data,
303 MuttFormatFlags flags)
304{
305 const struct MenuStatusLineData *msld = data;
306 const struct IndexSharedData *shared = msld->shared;
307 const struct Mailbox *m = shared->mailbox;
308
309 return m ? m->msg_count : 0;
310}
311
315static long index_new_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
316{
317 const struct MenuStatusLineData *msld = data;
318 const struct IndexSharedData *shared = msld->shared;
319 const struct Mailbox *m = shared->mailbox;
320
321 return m ? m->msg_new : 0;
322}
323
327static long index_old_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
328{
329 const struct MenuStatusLineData *msld = data;
330 const struct IndexSharedData *shared = msld->shared;
331 const struct Mailbox *m = shared->mailbox;
332
333 return m ? (m->msg_unread - m->msg_new) : 0;
334}
335
339static long index_postponed_count_num(const struct ExpandoNode *node,
340 void *data, MuttFormatFlags flags)
341{
342 const struct MenuStatusLineData *msld = data;
343 const struct IndexSharedData *shared = msld->shared;
344 struct Mailbox *m = shared->mailbox;
345
346 return mutt_num_postponed(m, false);
347}
348
352static void index_readonly(const struct ExpandoNode *node, void *data,
353 MuttFormatFlags flags, struct Buffer *buf)
354{
355 const struct MbTable *c_status_chars = cs_subset_mbtable(NeoMutt->sub, "status_chars");
356 if (!c_status_chars || !c_status_chars->len)
357 return;
358
359 const struct MenuStatusLineData *msld = data;
360 const struct IndexSharedData *shared = msld->shared;
361 const struct Mailbox *m = shared->mailbox;
362
363 size_t i = 0;
364
365 if (m)
366 {
367 i = shared->attach_msg ? 3 :
368 ((m->readonly || m->dontwrite) ? 2 :
369 (m->changed ||
370 /* deleted doesn't necessarily mean changed in IMAP */
371 (m->type != MUTT_IMAP && m->msg_deleted)) ?
372 1 :
373 0);
374 }
375
376 if (i >= c_status_chars->len)
377 buf_addstr(buf, c_status_chars->chars[0]);
378 else
379 buf_addstr(buf, c_status_chars->chars[i]);
380}
381
385static long index_read_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
386{
387 const struct MenuStatusLineData *msld = data;
388 const struct IndexSharedData *shared = msld->shared;
389 const struct Mailbox *m = shared->mailbox;
390
391 return m ? (m->msg_count - m->msg_unread) : 0;
392}
393
397static long index_tagged_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
398{
399 const struct MenuStatusLineData *msld = data;
400 const struct IndexSharedData *shared = msld->shared;
401 const struct Mailbox *m = shared->mailbox;
402
403 return m ? m->msg_tagged : 0;
404}
405
409static long index_unread_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
410{
411 const struct MenuStatusLineData *msld = data;
412 const struct IndexSharedData *shared = msld->shared;
413 const struct Mailbox *m = shared->mailbox;
414
415 return m ? m->msg_unread : 0;
416}
417
421static long index_unread_mailboxes_num(const struct ExpandoNode *node,
422 void *data, MuttFormatFlags flags)
423{
424 const struct MenuStatusLineData *msld = data;
425 const struct IndexSharedData *shared = msld->shared;
426 struct Mailbox *m = shared->mailbox;
427
429}
430
434static void menu_percentage(const struct ExpandoNode *node, void *data,
435 MuttFormatFlags flags, struct Buffer *buf)
436{
437 const struct MenuStatusLineData *msld = data;
438 const struct Menu *menu = msld->menu;
439 if (!menu)
440 return;
441
442 char tmp[128] = { 0 };
443
444 char *cp = NULL;
445 if (menu->top + menu->page_len >= menu->max)
446 {
447 cp = menu->top ?
448 /* L10N: Status bar message: the end of the list emails is visible in the index */
449 _("end") :
450 /* L10N: Status bar message: all the emails are visible in the index */
451 _("all");
452 }
453 else
454 {
455 int count = (100 * (menu->top + menu->page_len)) / menu->max;
456 /* L10N: Status bar, percentage of way through index.
457 `%d` is the number, `%%` is the percent symbol.
458 They may be reordered, or space inserted, if you wish. */
459 snprintf(tmp, sizeof(tmp), _("%d%%"), count);
460 cp = tmp;
461 }
462
463 buf_strcpy(buf, cp);
464}
465
469static long menu_percentage_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
470{
471 const struct MenuStatusLineData *msld = data;
472 const struct Menu *menu = msld->menu;
473 if (!menu)
474 return 0;
475
476 if (menu->top + menu->page_len >= menu->max)
477 return 100;
478
479 return (100 * (menu->top + menu->page_len)) / menu->max;
480}
481
488 // clang-format off
512 { -1, -1, NULL, NULL },
513 // clang-format on
514};
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
Definition: buffer.c:291
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
Definition: buffer.c:226
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Definition: buffer.c:395
void mutt_pretty_mailbox(char *buf, size_t buflen)
Shorten a mailbox path using '~' or '='.
Definition: muttlib.c:440
struct MbTable * cs_subset_mbtable(const struct ConfigSubset *sub, const char *name)
Get a Multibyte table config item by name.
Definition: helpers.c:119
short cs_subset_sort(const struct ConfigSubset *sub, const char *name)
Get a sort config item by name.
Definition: helpers.c:266
Convenience wrapper for the config headers.
#define SORT_MASK
Mask for the sort id.
Definition: sort.h:38
#define SORT_LAST
Sort thread by last-X, e.g. received date.
Definition: sort.h:40
#define SORT_REVERSE
Reverse the order of the sort.
Definition: sort.h:39
Convenience wrapper for the core headers.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
Definition: mailbox.h:223
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:51
@ MUTT_IMAP
'IMAP' Mailbox type
Definition: mailbox.h:50
@ ED_MENU
Menu ED_MEN_ ExpandoDataMenu.
Definition: domain.h:48
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition: domain.h:44
@ ED_INDEX
Index ED_IND_ ExpandoDataIndex.
Definition: domain.h:46
Structs that make up an email.
EmailSortType
Methods for sorting Emails.
Definition: sort.h:53
Parse Expando string.
const struct ExpandoRenderCallback StatusRenderCallbacks[]
Callbacks for Status Expandos.
static char * get_sort_str(char *buf, size_t buflen, enum EmailSortType method)
Get the sort method as a string.
static void global_hostname(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Local hostname - Implements get_string_t -.
static void global_version(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Version string - Implements get_string_t -.
GUI display a user-configurable status line.
char * ShortHostname
Short version of the hostname.
Definition: globals.c:38
static long index_deleted_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of deleted messages - Implements get_number_t -.
static long index_tagged_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of tagged messages - Implements get_number_t -.
static long index_limit_size_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Size of the messages - Implements get_number_t -.
static long index_old_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of old messages - Implements get_number_t -.
static long index_limit_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of messages - Implements get_number_t -.
static long index_new_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of new messages - Implements get_number_t -.
static long index_mailbox_size_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Size of the current mailbox - Implements get_number_t -.
static long index_postponed_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of postponed messages - Implements get_number_t -.
static long index_unread_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of unread messages - Implements get_number_t -.
static long index_unread_mailboxes_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of mailboxes with new mail - Implements get_number_t -.
static long index_flagged_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of flagged messages - Implements get_number_t -.
static long menu_percentage_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Percentage through index - Implements get_number_t -.
static long index_message_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of messages in the mailbox - Implements get_number_t -.
static long index_read_count_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of read messages - Implements get_number_t -.
static void global_config_sort(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Sorting mode - Implements get_string_t -.
static void global_config_sort_aux(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Aux sorting method - Implements get_string_t -.
static void index_limit_size(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Size of the messages - Implements get_string_t -.
static void index_mailbox_path(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: pathname of the mailbox - Implements get_string_t -.
static void menu_percentage(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Percentage through index - Implements get_string_t -.
static void index_description(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Description of the mailbox - Implements get_string_t -.
static void index_readonly(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Modified/read-only flag - Implements get_string_t -.
static void index_mailbox_size(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Size of the current mailbox - Implements get_string_t -.
static void index_limit_pattern(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Active limit pattern - Implements get_string_t -.
static void global_config_use_threads(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Current threading mode - Implements get_string_t -.
Data shared between Index, Pager and Sidebar.
@ ED_IND_LIMIT_COUNT
Mailbox.vcount.
Definition: shared_data.h:59
@ ED_IND_MAILBOX_PATH
Mailbox.pathbuf, Mailbox.name.
Definition: shared_data.h:62
@ ED_IND_DELETED_COUNT
Mailbox.msg_deleted.
Definition: shared_data.h:56
@ ED_IND_NEW_COUNT
Mailbox.msg_new.
Definition: shared_data.h:65
@ ED_IND_MAILBOX_SIZE
Mailbox.size.
Definition: shared_data.h:63
@ ED_IND_LIMIT_PATTERN
MailboxView.pattern.
Definition: shared_data.h:60
@ ED_IND_READ_COUNT
Mailbox.msg_count, Mailbox.msg_unread.
Definition: shared_data.h:69
@ ED_IND_POSTPONED_COUNT
mutt_num_postponed()
Definition: shared_data.h:67
@ ED_IND_FLAGGED_COUNT
Mailbox.msg_flagged.
Definition: shared_data.h:58
@ ED_IND_MESSAGE_COUNT
Mailbox.msg_count.
Definition: shared_data.h:64
@ ED_IND_OLD_COUNT
Mailbox.msg_unread, Mailbox.msg_new.
Definition: shared_data.h:66
@ ED_IND_READONLY
Mailbox.readonly, Mailbox.dontwrite.
Definition: shared_data.h:68
@ ED_IND_UNREAD_COUNT
Mailbox.msg_unread.
Definition: shared_data.h:71
@ ED_IND_TAGGED_COUNT
Mailbox.msg_tagged.
Definition: shared_data.h:70
@ ED_IND_LIMIT_SIZE
MailboxView.vsize.
Definition: shared_data.h:61
@ ED_IND_DESCRIPTION
Mailbox.name.
Definition: shared_data.h:57
@ ED_IND_UNREAD_MAILBOXES
Mailbox, mutt_mailbox_check()
Definition: shared_data.h:72
Config/command parsing.
const struct Mapping SortMethods[]
Sort methods for '$sort' for the index.
Definition: mutt_config.c:89
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
Definition: mapping.c:42
GUI present the user with a selectable list.
@ ED_MEN_PERCENTAGE
Menu.top, ...
Definition: lib.h:68
Convenience wrapper for the library headers.
#define _(a)
Definition: message.h:28
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:581
int mutt_mailbox_check(struct Mailbox *m_cur, CheckStatsFlags flags)
Check all all Mailboxes for new mail.
Definition: mutt_mailbox.c:169
Mailbox helper functions.
const char * get_use_threads_str(enum UseThreads value)
Convert UseThreads enum to string.
Definition: mutt_thread.c:99
enum UseThreads mutt_thread_style(void)
Which threading style is active?
Definition: mutt_thread.c:81
Create/manipulate threading in emails.
UseThreads
Which threading style is active, $use_threads.
Definition: mutt_thread.h:97
const char * mutt_make_version(void)
Generate the NeoMutt version string.
Definition: muttlib.c:858
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
Definition: muttlib.c:1004
Some miscellaneous functions.
bool mview_has_limit(const struct MailboxView *mv)
Is a limit active?
Definition: mview.c:438
View of a Mailbox.
#define MUTT_MAILBOX_CHECK_NO_FLAGS
No flags are set.
Definition: mxapi.h:53
Postponed Emails.
int mutt_num_postponed(struct Mailbox *m, bool force)
Return the number of postponed messages.
Definition: postpone.c:70
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
Definition: render.h:32
String manipulation buffer.
Definition: buffer.h:36
Basic Expando Node.
Definition: node.h:67
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:37
struct Mailbox * mailbox
Current Mailbox.
Definition: shared_data.h:41
bool attach_msg
Are we in "attach message" mode?
Definition: shared_data.h:46
struct MailboxView * mailbox_view
Current Mailbox view.
Definition: shared_data.h:40
View of a Mailbox.
Definition: mview.h:40
off_t vsize
Size (in bytes) of the messages shown.
Definition: mview.h:41
char * pattern
Limit pattern string.
Definition: mview.h:42
A mailbox.
Definition: mailbox.h:79
int vcount
The number of virtual messages.
Definition: mailbox.h:99
bool changed
Mailbox has been modified.
Definition: mailbox.h:110
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
Definition: mailbox.h:81
int msg_new
Number of new messages.
Definition: mailbox.h:92
int msg_count
Total number of messages.
Definition: mailbox.h:88
enum MailboxType type
Mailbox type.
Definition: mailbox.h:102
char * name
A short name for the Mailbox.
Definition: mailbox.h:82
struct Buffer pathbuf
Path of the Mailbox.
Definition: mailbox.h:80
int msg_deleted
Number of deleted messages.
Definition: mailbox.h:93
bool dontwrite
Don't write the mailbox on close.
Definition: mailbox.h:111
off_t size
Size of the Mailbox.
Definition: mailbox.h:84
int msg_flagged
Number of flagged messages.
Definition: mailbox.h:90
void * compress_info
Compressed mbox module private data.
Definition: mailbox.h:121
bool readonly
Don't allow changes to the mailbox.
Definition: mailbox.h:116
int msg_tagged
How many messages are tagged?
Definition: mailbox.h:94
int msg_unread
Number of unread messages.
Definition: mailbox.h:89
Multibyte character table.
Definition: mbtable.h:36
int len
Number of characters.
Definition: mbtable.h:38
char ** chars
The array of multibyte character strings.
Definition: mbtable.h:39
Data for creating a Menu line.
struct IndexSharedData * shared
Data shared between Index, Pager and Sidebar.
struct Menu * menu
Current Menu.
Definition: lib.h:79
int top
Entry that is the top of the current page.
Definition: lib.h:90
int max
Number of entries in the menu.
Definition: lib.h:81
int page_len
Number of entries per screen.
Definition: lib.h:84
Container for Accounts, Notifications.
Definition: neomutt.h:42
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:46
@ ED_GLO_CONFIG_USE_THREADS
Value of $use_threads.
Definition: uid.h:36
@ ED_GLO_CONFIG_SORT
Value of $sort.
Definition: uid.h:34
@ ED_GLO_VERSION
NeoMutt version.
Definition: uid.h:42
@ ED_GLO_CONFIG_SORT_AUX
Value of $sort_aux.
Definition: uid.h:35
@ ED_GLO_HOSTNAME
Local hostname.
Definition: uid.h:37