67 snprintf(buf, buflen,
"%s%s%s", (method &
SORT_REVERSE) ?
"reverse-" :
"",
89 if (!c_status_chars || !c_status_chars->
len)
109 if (i >= c_status_chars->
len)
128 const char *s = m->
name;
146 char tmp[128] = { 0 };
302 char tmp[128] = { 0 };
304 const off_t num = m ? m->
size : 0;
326 char tmp[128] = { 0 };
339 char tmp[128] = { 0 };
342 const char *s =
get_sort_str(tmp,
sizeof(tmp), c_sort_aux);
352 const struct Menu *menu = msld->
menu;
369 const struct Menu *menu = msld->
menu;
373 char tmp[128] = { 0 };
390 snprintf(tmp,
sizeof(tmp),
_(
"%d%%"), count);
418 return mailbox_view->
vsize;
431 char tmp[128] = { 0 };
433 const off_t num = mailbox_view ? mailbox_view->
vsize : 0;
534 { -1, -1, NULL, NULL },
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
void mutt_pretty_mailbox(char *buf, size_t buflen)
Shorten a mailbox path using '~' or '='.
struct MbTable * cs_subset_mbtable(const struct ConfigSubset *sub, const char *name)
Get a Multibyte table config item by name.
short cs_subset_sort(const struct ConfigSubset *sub, const char *name)
Get a sort config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
@ MUTT_IMAP
'IMAP' Mailbox type
@ ED_MENU
Menu ED_MEN_ ExpandoDataMenu.
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
@ ED_INDEX
Index ED_IND_ ExpandoDataIndex.
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.
char * ShortHostname
Short version of the hostname.
long status_p_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of postponed messages - Implements ExpandoRenderData::get_number() -.
long status_b_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of mailboxes with new mail - Implements ExpandoRenderData::get_number() -.
long status_R_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of read messages - Implements ExpandoRenderData::get_number() -.
long status_d_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of deleted messages - Implements ExpandoRenderData::get_number() -.
long status_o_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of old messages - Implements ExpandoRenderData::get_number() -.
long status_t_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of tagged messages - Implements ExpandoRenderData::get_number() -.
long status_n_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of new messages - Implements ExpandoRenderData::get_number() -.
long status_m_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of messages in the mailbox - Implements ExpandoRenderData::get_number() -.
long status_F_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of flagged messages - Implements ExpandoRenderData::get_number() -.
long status_P_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Percentage through index - Implements ExpandoRenderData::get_number() -.
long status_u_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of unread messages - Implements ExpandoRenderData::get_number() -.
long status_M_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Number of messages - Implements ExpandoRenderData::get_number() -.
long status_l_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Size of the current mailbox - Implements ExpandoRenderData::get_number() -.
long status_L_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Status: Size of the messages - Implements ExpandoRenderData::get_number() -.
void status_r(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Modified/read-only flag - Implements ExpandoRenderData::get_string() -.
void status_T(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Current threading mode - Implements ExpandoRenderData::get_string() -.
void status_s(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Sorting mode - Implements ExpandoRenderData::get_string() -.
void status_l(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Size of the current mailbox - Implements ExpandoRenderData::get_string() -.
void status_D(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Description of the mailbox - Implements ExpandoRenderData::get_string() -.
void status_L(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Size of the messages - Implements ExpandoRenderData::get_string() -.
void status_h(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Local hostname - Implements ExpandoRenderData::get_string() -.
void status_f(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: pathname of the mailbox - Implements ExpandoRenderData::get_string() -.
void status_v(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Version string - Implements ExpandoRenderData::get_string() -.
void status_S(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Aux sorting method - Implements ExpandoRenderData::get_string() -.
void status_V(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Active limit pattern - Implements ExpandoRenderData::get_string() -.
void status_P(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: Percentage through index - Implements ExpandoRenderData::get_string() -.
GUI manage the main index (list of emails)
@ ED_IND_LIMIT_COUNT
Mailbox.vcount.
@ ED_IND_MAILBOX_PATH
Mailbox.pathbuf, Mailbox.name.
@ ED_IND_DELETED_COUNT
Mailbox.msg_deleted.
@ ED_IND_NEW_COUNT
Mailbox.msg_new.
@ ED_IND_MAILBOX_SIZE
Mailbox.size.
@ ED_IND_LIMIT_PATTERN
MailboxView.pattern.
@ ED_IND_READ_COUNT
Mailbox.msg_count, Mailbox.msg_unread.
@ ED_IND_POSTPONED_COUNT
mutt_num_postponed()
@ ED_IND_FLAGGED_COUNT
Mailbox.msg_flagged.
@ ED_IND_MESSAGE_COUNT
Mailbox.msg_count.
@ ED_IND_OLD_COUNT
Mailbox.msg_unread, Mailbox.msg_new.
@ ED_IND_READONLY
Mailbox.readonly, Mailbox.dontwrite.
@ ED_IND_UNREAD_COUNT
Mailbox.msg_unread.
@ ED_IND_TAGGED_COUNT
Mailbox.msg_tagged.
@ ED_IND_LIMIT_SIZE
MailboxView.vsize.
@ ED_IND_DESCRIPTION
Mailbox.name.
@ ED_IND_UNREAD_MAILBOXES
Mailbox, mutt_mailbox_check()
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
Convenience wrapper for the library headers.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
int mutt_mailbox_check(struct Mailbox *m_cur, CheckStatsFlags flags)
Check all all Mailboxes for new mail.
Mailbox helper functions.
const char * get_use_threads_str(enum UseThreads value)
Convert UseThreads enum to string.
enum UseThreads mutt_thread_style(void)
Which threading style is active?
Create/manipulate threading in emails.
UseThreads
Which threading style is active, $use_threads.
const char * mutt_make_version(void)
Generate the NeoMutt version string.
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
Some miscellaneous functions.
bool mview_has_limit(const struct MailboxView *mv)
Is a limit active?
#define MUTT_MAILBOX_CHECK_NO_FLAGS
No flags are set.
int mutt_num_postponed(struct Mailbox *m, bool force)
Return the number of postponed messages.
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
const struct Mapping SortMethods[]
Sort methods for '$sort' for the index.
#define SORT_MASK
Mask for the sort id.
#define SORT_LAST
Sort thread by last-X, e.g. received date.
SortType
Methods for sorting.
#define SORT_REVERSE
Reverse the order of the sort.
const struct ExpandoRenderData StatusRenderData[]
Callbacks for Status Expandos.
static char * get_sort_str(char *buf, size_t buflen, enum SortType method)
Get the sort method as a string.
void menu_status_line(struct Buffer *buf, struct IndexSharedData *shared, struct Menu *menu, int max_cols, const struct Expando *exp)
Create the status line.
GUI display a user-configurable status line.
String manipulation buffer.
Data shared between Index, Pager and Sidebar.
struct Mailbox * mailbox
Current Mailbox.
bool attach_msg
Are we in "attach message" mode?
struct MailboxView * mailbox_view
Current Mailbox view.
struct Menu * menu
Needed for pattern compilation.
off_t vsize
Size (in bytes) of the messages shown.
char * pattern
Limit pattern string.
int vcount
The number of virtual messages.
bool changed
Mailbox has been modified.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
int msg_new
Number of new messages.
int msg_count
Total number of messages.
enum MailboxType type
Mailbox type.
char * name
A short name for the Mailbox.
struct Buffer pathbuf
Path of the Mailbox.
int msg_deleted
Number of deleted messages.
bool dontwrite
Don't write the mailbox on close.
off_t size
Size of the Mailbox.
int msg_flagged
Number of flagged messages.
void * compress_info
Compressed mbox module private data.
bool readonly
Don't allow changes to the mailbox.
int msg_tagged
How many messages are tagged?
int msg_unread
Number of unread messages.
Multibyte character table.
int len
Number of characters.
char ** chars
The array of multibyte character strings.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
@ ED_GLO_SORT
Value of $sort.
@ ED_GLO_VERSION
NeoMutt version.
@ ED_GLO_USE_THREADS
Value of $use_threads.
@ ED_GLO_HOSTNAME
Local hostname.
@ ED_GLO_SORT_AUX
Value of $sort_aux.