32#include "docs/makedoc_defs.h"
60 {
"delete-entry", OP_DELETE },
62 {
"limit", OP_MAIN_LIMIT },
64 {
"sort-alias", OP_SORT },
65 {
"sort-alias-reverse", OP_SORT_REVERSE },
66 {
"tag-pattern", OP_MAIN_TAG_PATTERN },
67 {
"undelete-entry", OP_UNDELETE },
68 {
"untag-pattern", OP_MAIN_UNTAG_PATTERN },
76 {
"create-alias", OP_CREATE_ALIAS },
78 {
"limit", OP_MAIN_LIMIT },
80 {
"query", OP_QUERY },
81 {
"query-append", OP_QUERY_APPEND },
83 {
"sort-reverse", OP_SORT_REVERSE },
84 {
"tag-pattern", OP_MAIN_TAG_PATTERN },
85 {
"untag-pattern", OP_MAIN_UNTAG_PATTERN },
96 { OP_MAIN_LIMIT,
"l" },
97 { OP_MAIN_TAG_PATTERN,
"T" },
98 { OP_MAIN_UNTAG_PATTERN,
"\024" },
100 { OP_SORT_REVERSE,
"O" },
101 { OP_TAG,
"<space>" },
102 { OP_UNDELETE,
"u" },
110 { OP_CREATE_ALIAS,
"a" },
113 { OP_MAIN_LIMIT,
"l" },
114 { OP_MAIN_TAG_PATTERN,
"T" },
115 { OP_MAIN_UNTAG_PATTERN,
"\024" },
117 { OP_QUERY_APPEND,
"A" },
119 { OP_SORT_REVERSE,
"O" },
120 { OP_TAG,
"<space>" },
185 ARRAY_GET(&mdata->
ava, index)->is_deleted = (op == OP_DELETE);
188 if (c_resolve && (index < (menu->
max - 1)))
234 avp->
is_tagged = (ARRAY_FOREACH_IDX == idx);
319 char title[256] = { 0 };
320 snprintf(title,
sizeof(title),
"%s%s",
_(
"Query: "),
buf_string(buf));
330 struct Alias *np = NULL;
331 struct Alias *tmp = NULL;
361 case OP_SEARCH_REVERSE:
367 case OP_SEARCH_OPPOSITE:
393 bool reverse = (op == OP_SORT_REVERSE);
397 _(
"Rev-Sort (a)lias, a(d)dress or (u)nsorted?") :
399 _(
"Sort (a)lias, a(d)dress or (u)nsorted?"),
466 if (!dlg || !dlg->
wdata)
void mutt_addrlist_copy(struct AddressList *dst, const struct AddressList *src, bool prune)
Copy a list of addresses into another list.
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
const struct MenuFuncOp OpQuery[]
Functions for the external Query Menu.
const struct MenuOpSeq QueryDefaultBindings[]
Key bindings for the external Query Menu.
const struct MenuOpSeq AliasDefaultBindings[]
Key bindings for the Alias Menu.
static const struct AliasFunction AliasFunctions[]
All the NeoMutt functions that the Alias supports.
const struct MenuFuncOp OpAlias[]
Functions for the Alias Menu.
void alias_array_sort(struct AliasViewArray *ava, const struct ConfigSubset *sub)
Sort and reindex an AliasViewArray.
void alias_create(struct AddressList *al, const struct ConfigSubset *sub)
Create a new Alias from an Address.
void aliaslist_clear(struct AliasList *al)
Empty a List of Aliases.
Representation of a single alias to an email address.
int alias_array_alias_add(struct AliasViewArray *ava, struct Alias *alias)
Add an Alias to the AliasViewArray.
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
#define ARRAY_SIZE(head)
The number of elements stored.
#define ARRAY_FREE(head)
Release all memory.
#define ARRAY_GET(head, idx)
Return the element at index.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean 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.
struct MuttWindow * dialog_find(struct MuttWindow *win)
Find the parent Dialog of a Window.
const char * dispatcher_get_retval_name(int rv)
Get the name of a return value.
@ FR_SUCCESS
Valid function - successfully performed.
@ FR_DONE
Exit the Dialog.
@ FR_UNKNOWN
Unknown function.
@ FR_ERROR
Valid function - error occurred.
@ FR_CONTINUE
Remain in the Dialog.
@ FR_NO_ACTION
Valid function - no action performed.
int query_run(const char *s, bool verbose, struct AliasList *al, const struct ConfigSubset *sub)
Run an external program to find Addresses.
bool alias_to_addrlist(struct AddressList *al, struct Alias *alias)
Turn an Alias into an AddressList.
static int op_delete(struct AliasMenuData *mdata, int op)
delete the current entry - Implements alias_function_t -
static int op_generic_select_entry(struct AliasMenuData *mdata, int op)
select the current entry - Implements alias_function_t -
static int op_main_tag_pattern(struct AliasMenuData *mdata, int op)
Tag messages matching a pattern - Implements alias_function_t -.
static int op_main_limit(struct AliasMenuData *mdata, int op)
show only messages matching a pattern - Implements alias_function_t -
static int op_exit(struct AliasMenuData *mdata, int op)
exit this menu - Implements alias_function_t -
static int op_main_untag_pattern(struct AliasMenuData *mdata, int op)
Untag messages matching a pattern - Implements alias_function_t -.
static int op_query(struct AliasMenuData *mdata, int op)
query external program for addresses - Implements alias_function_t -
static int op_search(struct AliasMenuData *mdata, int op)
search for a regular expression - Implements alias_function_t -
static int op_create_alias(struct AliasMenuData *mdata, int op)
create an alias from a message sender - Implements alias_function_t -
static int op_sort(struct AliasMenuData *mdata, int op)
sort aliases - Implements alias_function_t -
int alias_function_dispatcher(struct MuttWindow *win, int op)
Perform a Alias function - Implements function_dispatcher_t -.
int mw_get_field(const char *prompt, struct Buffer *buf, CompletionFlags complete, enum HistoryClass hclass, const struct CompleteOps *comp_api, void *cdata)
Ask the user for a string -.
int mw_multi_choice(const char *prompt, const char *letters)
Offer the user a multiple choice question -.
#define mutt_debug(LEVEL,...)
Convenience wrapper for the gui headers.
void alias_set_title(struct MuttWindow *sbar, char *menu_name, char *limit)
Create a title string for the Menu.
Shared code for the Alias and Query Dialogs.
Read/write command history from/to a file.
@ HC_OTHER
Miscellaneous strings.
@ LL_DEBUG1
Log at debug level 1.
Convenience wrapper for the library headers.
Many unsorted constants and some structs.
#define MUTT_COMP_NO_FLAGS
No flags are set.
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
const char * opcodes_get_name(int op)
Get the name of an opcode.
Match patterns to emails.
@ PAA_VISIBLE
Set AliasView.is_visible and hide the rest.
@ PAA_TAG
Set AliasView.is_tagged, but don't touch the others.
@ PAA_UNTAG
Unset AliasView.is_tagged, but don't touch the others.
int mutt_pattern_alias_func(char *prompt, struct AliasMenuData *mdata, enum PatternAlias action, struct Menu *menu)
Perform some Pattern matching for Alias.
int mutt_search_alias_command(struct Menu *menu, int cur, struct SearchState *state, SearchFlags flags)
Perform a search.
#define TAILQ_FOREACH_SAFE(var, head, field, tvar)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define TAILQ_REMOVE(head, elm, field)
#define TAILQ_HEAD_INITIALIZER(head)
#define TAILQ_EMPTY(head)
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
#define SEARCH_OPPOSITE
Search in the opposite direction.
uint8_t SearchFlags
Flags for a specific search, e.g. SEARCH_PROMPT.
#define SEARCH_NO_FLAGS
No flags are set.
#define SEARCH_PROMPT
Ask for search input.
@ SORT_ORDER
Sort by the order the messages appear in the mailbox.
@ SORT_ALIAS
Sort by email alias.
@ SORT_ADDRESS
Sort by email address.
#define SORT_REVERSE
Reverse the order of the sort.
int op
Op code, e.g. OP_SEARCH.
alias_function_t function
Function to call.
GUI data wrapping an Alias.
bool is_visible
Is visible?
struct Alias * alias
Alias.
bool is_deleted
Is it deleted?
bool is_tagged
Is it tagged?
A shortcut for an email address or addresses.
String manipulation buffer.
void * wdata
Private data.
bool reverse
search backwards
int cs_subset_str_native_set(const struct ConfigSubset *sub, const char *name, intptr_t value, struct Buffer *err)
Natively set the value of a string config item.