53 {
"create-account", OP_AUTOCRYPT_CREATE_ACCT },
54 {
"delete-account", OP_AUTOCRYPT_DELETE_ACCT },
56 {
"toggle-active", OP_AUTOCRYPT_TOGGLE_ACTIVE },
57 {
"toggle-prefer-encrypt", OP_AUTOCRYPT_TOGGLE_PREFER },
65 { OP_AUTOCRYPT_CREATE_ACCT,
"c" },
66 { OP_AUTOCRYPT_DELETE_ACCT,
"D" },
67 { OP_AUTOCRYPT_TOGGLE_ACTIVE,
"a" },
68 { OP_AUTOCRYPT_TOGGLE_PREFER,
"p" },
147 char msg[128] = { 0 };
148 snprintf(msg,
sizeof(msg),
150 _(
"Really delete account \"%s\"?"),
buf_string((*pentry)->addr->mailbox));
230 if (!event || !dlg || !dlg->
wdata)
233 const int op =
event->op;
#define ARRAY_GET(head, idx)
Return the element at index.
int mutt_autocrypt_db_account_delete(struct AutocryptAccount *acct)
Delete an Account from the Autocrypt database.
int mutt_autocrypt_db_account_update(struct AutocryptAccount *acct)
Update Account info in the Autocrypt database.
static void toggle_active(struct AccountEntry *entry)
Toggle whether an Autocrypt account is active.
static const struct MenuFuncOp OpAutocrypt[]
Functions for the Autocrypt Account.
static const struct AutocryptFunction AutocryptFunctions[]
All the NeoMutt functions that the Autocrypt supports.
struct MenuDefinition * MdAutocrypt
Autocrypt Menu Definition.
void autocrypt_init_keys(struct SubMenu *sm_generic)
Initialise the Autocrypt Keybindings - Implements ::init_keys_api.
static const struct MenuOpSeq AutocryptDefaultBindings[]
Key bindings for the Autocrypt Account.
static void toggle_prefer_encrypt(struct AccountEntry *entry)
Toggle whether an Autocrypt account prefers encryption.
Autocrypt end-to-end encryption.
Shared constants/structs that are private to Autocrypt.
int mutt_autocrypt_account_init(bool prompt)
Create a new Autocrypt account.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
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_UNKNOWN
Unknown function.
@ FR_ERROR
Valid function - error occurred.
@ FR_NO_ACTION
Valid function - no action performed.
bool populate_menu(struct Menu *menu)
Add the Autocrypt data to a Menu.
static int op_exit(struct AliasMenuData *mdata, const struct KeyEvent *event)
exit this menu - Implements alias_function_t -
static int op_autocrypt_toggle_active(struct AutocryptData *ad, const struct KeyEvent *event)
Toggle the current account active/inactive - Implements autocrypt_function_t -.
static int op_autocrypt_create_acct(struct AutocryptData *ad, const struct KeyEvent *event)
Create a new autocrypt account - Implements autocrypt_function_t -.
static int op_autocrypt_delete_acct(struct AutocryptData *ad, const struct KeyEvent *event)
Delete the current account - Implements autocrypt_function_t -.
static int op_autocrypt_toggle_prefer(struct AutocryptData *ad, const struct KeyEvent *event)
Toggle the current account prefer-encrypt flag - Implements autocrypt_function_t -.
int autocrypt_function_dispatcher(struct MuttWindow *win, const struct KeyEvent *event)
Perform a Autocrypt function - Implements function_dispatcher_t -.
#define mutt_debug(LEVEL,...)
Convenience wrapper for the gui headers.
void km_menu_add_submenu(struct MenuDefinition *md, struct SubMenu *sm)
Add a SubMenu to a Menu Definition.
struct SubMenu * km_register_submenu(const struct MenuFuncOp functions[])
Register a submenu.
struct MenuDefinition * km_register_menu(int menu, const char *name)
Register a menu.
void km_menu_add_bindings(struct MenuDefinition *md, const struct MenuOpSeq bindings[])
Add Keybindings to a Menu.
@ LL_DEBUG1
Log at debug level 1.
Convenience wrapper for the library headers.
const char * opcodes_get_name(int op)
Get the name of an opcode.
@ MUTT_NO
User answered 'No', or assume 'No'.
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
enum QuadOption query_yesorno(const char *prompt, enum QuadOption def)
Ask the user a Yes/No question.
An entry in the Autocrypt account Menu.
struct AutocryptAccount * account
Account details.
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.
struct AccountEntryArray entries
Account Entries.
autocrypt_function_t function
Function to call.
int op
Op code, e.g. OP_AUTOCRYPT_CREATE_ACCT.
An event such as a keypress.
void * wdata
Private data.
@ MENU_AUTOCRYPT
Autocrypt Account menu.