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 {
"undelete-entry", OP_UNDELETE },
74 {
"create-alias", OP_CREATE_ALIAS },
76 {
"limit", OP_MAIN_LIMIT },
78 {
"query", OP_QUERY },
79 {
"query-append", OP_QUERY_APPEND },
81 {
"sort-reverse", OP_SORT_REVERSE },
92 { OP_MAIN_LIMIT,
"l" },
94 { OP_SORT_REVERSE,
"O" },
95 { OP_TAG,
"<space>" },
104 { OP_CREATE_ALIAS,
"a" },
107 { OP_MAIN_LIMIT,
"l" },
109 { OP_QUERY_APPEND,
"A" },
111 { OP_SORT_REVERSE,
"O" },
176 ARRAY_GET(&mdata->
ava, index)->is_deleted = (op == OP_DELETE);
179 if (c_resolve && (index < (menu->
max - 1)))
225 avp->
is_tagged = (ARRAY_FOREACH_IDX == idx);
277 char title[256] = { 0 };
278 snprintf(title,
sizeof(title),
"%s%s",
_(
"Query: "),
buf_string(buf));
288 struct Alias *np = NULL;
289 struct Alias *tmp = NULL;
319 case OP_SEARCH_REVERSE:
325 case OP_SEARCH_OPPOSITE:
351 bool reverse = (op == OP_SORT_REVERSE);
355 _(
"Rev-Sort (a)lias, a(d)dress or (u)nsorted?") :
357 _(
"Sort (a)lias, a(d)dress or (u)nsorted?"),
420 if (!win || !win->
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.
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_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_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_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.
int mutt_search_alias_command(struct Menu *menu, int cur, struct SearchState *state, SearchFlags flags)
Perform a search.
int mutt_pattern_alias_func(char *prompt, struct AliasMenuData *mdata, struct Menu *menu)
Perform some Pattern matching for Alias.
#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.