89 {
N_(
"Exit"), OP_EXIT },
92 {
N_(
"Create"), OP_AUTOCRYPT_CREATE_ACCT },
95 {
N_(
"Delete"), OP_AUTOCRYPT_DELETE_ACCT },
101 {
N_(
"Tgl Active"), OP_AUTOCRYPT_TOGGLE_ACTIVE },
107 {
N_(
"Prf Encr"), OP_AUTOCRYPT_TOGGLE_PREFER },
108 {
N_(
"Help"), OP_HELP },
125 char op,
const char *src,
const char *prec,
126 const char *if_str,
const char *else_str,
130 char tmp[128] = { 0 };
141 snprintf(tmp,
sizeof(tmp),
"%%%sd", prec);
142 snprintf(buf, buflen, tmp, entry->
num);
200 for (
size_t i = 0; i < menu->
max; i++)
221 int num_accounts = 0;
227 menu->
mdata = entries;
229 menu->
max = num_accounts;
231 for (
int i = 0; i < num_accounts; i++)
233 entries[i].
num = i + 1;
237 entries[i].
account = accounts[i];
291 if (ev_w->
win != win_menu)
void mutt_addr_free(struct Address **ptr)
Free a single Address.
struct Address * mutt_addr_new(void)
Create a new Address.
bool mutt_addr_to_local(struct Address *a)
Convert an Address from Punycode.
void mutt_autocrypt_db_account_free(struct AutocryptAccount **ptr)
Free an AutocryptAccount.
int mutt_autocrypt_db_account_get_all(struct AutocryptAccount ***accounts, int *num_accounts)
Get all accounts from an Autocrypt database.
int mutt_autocrypt_init(bool can_create)
Initialise Autocrypt.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
void mutt_format_s(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string.
@ FR_UNKNOWN
Unknown function.
static const struct Mapping AutocryptAcctHelp[]
Help Bar for the Autocrypt Account selection dialog.
void dlg_select_autocrypt_account(void)
Display the Autocrypt account Menu.
bool populate_menu(struct Menu *menu)
Add the Autocrypt data to a Menu.
int menu_tagging_dispatcher(struct MuttWindow *win, int op)
Perform tagging operations on the Menu - Implements function_dispatcher_t -.
int autocrypt_function_dispatcher(struct MuttWindow *win, int op)
Perform a Autocrypt function - Implements function_dispatcher_t -.
int global_function_dispatcher(struct MuttWindow *win, int op)
Perform a Global function - Implements function_dispatcher_t -.
int menu_function_dispatcher(struct MuttWindow *win, int op)
Perform a Menu function - Implements function_dispatcher_t -.
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 -.
static const char * autocrypt_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 Autocrypt account list - Implements format_t -.
#define mutt_debug(LEVEL,...)
static int autocrypt_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
static int autocrypt_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
Convenience wrapper for the gui headers.
void simple_dialog_free(struct MuttWindow **ptr)
Destroy a simple index Dialog.
struct MuttWindow * simple_dialog_new(enum MenuType mtype, enum WindowType wtype, const struct Mapping *help_data)
Create a simple index Dialog.
int km_dokey(enum MenuType mtype)
Determine what a keypress should do.
void km_error_key(enum MenuType mtype)
Handle an unbound key sequence.
@ LL_DEBUG5
Log at debug level 5.
@ LL_DEBUG1
Log at debug level 1.
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Convenience wrapper for the library headers.
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
struct MuttWindow * window_find_child(struct MuttWindow *win, enum WindowType type)
Recursively find a child Window of a given type.
@ WT_STATUS_BAR
Status Bar containing extra info about the Index/Pager/etc.
@ WT_DLG_AUTOCRYPT
Autocrypt Dialog, dlg_select_autocrypt_account()
@ NT_WINDOW_DELETE
Window is about to be deleted.
Some miscellaneous functions.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
const char * opcodes_get_name(int op)
Get the name of an opcode.
All user-callable functions.
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
An entry in the Autocrypt account Menu.
struct Address * addr
Email address associated with the account.
struct AutocryptAccount * account
Account details.
int num
Number in the index.
char * mailbox
Mailbox and host address.
bool enabled
Is this account enabled.
bool prefer_encrypt
false = nopref, true = mutual
Data to pass to the Autocrypt Functions.
bool done
Should we close the Dialog?
struct Menu * menu
Autocrypt Menu.
const char * name
Name of config item that changed.
An Event that happened to a Window.
struct MuttWindow * win
Window that changed.
Mapping between user-readable string and a constant.
struct WindowState state
Current state of the Window.
void * wdata
Private data.
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
Container for Accounts, Notifications.
struct Notify * notify
Notifications handler.
struct ConfigSubset * sub
Inherited config items.
Data passed to a notification function.
void * event_data
Data from notify_send()
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
void * global_data
Data from notify_observer_add()
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
@ MENU_AUTOCRYPT_ACCT
Autocrypt Account menu.