51 {
"create-account", OP_AUTOCRYPT_CREATE_ACCT },
52 {
"delete-account", OP_AUTOCRYPT_DELETE_ACCT },
54 {
"toggle-active", OP_AUTOCRYPT_TOGGLE_ACTIVE },
55 {
"toggle-prefer-encrypt", OP_AUTOCRYPT_TOGGLE_PREFER },
63 { OP_AUTOCRYPT_CREATE_ACCT,
"c" },
64 { OP_AUTOCRYPT_DELETE_ACCT,
"D" },
65 { OP_AUTOCRYPT_TOGGLE_ACTIVE,
"a" },
66 { OP_AUTOCRYPT_TOGGLE_PREFER,
"p" },
158 char msg[128] = { 0 };
159 snprintf(msg,
sizeof(msg),
161 _(
"Really delete account \"%s\"?"),
buf_string((*pentry)->addr->mailbox));
243 if (!event || !dlg || !dlg->
wdata)
249 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 const struct MenuFuncOp OpAutocrypt[]
Functions for the Autocrypt Account.
void autocrypt_init_keys(struct NeoMutt *n, struct SubMenu *sm_generic)
Initialise the Autocrypt Keybindings - Implements ::init_keys_api.
static const struct AutocryptFunction AutocryptFunctions[]
All the NeoMutt functions that the Autocrypt supports.
static bool toggle_active(struct AccountEntry *entry)
Toggle whether an Autocrypt account is active.
static const struct MenuOpSeq AutocryptDefaultBindings[]
Key bindings for the Autocrypt Account.
static bool toggle_prefer_encrypt(struct AccountEntry *entry)
Toggle whether an Autocrypt account prefers encryption.
Autocrypt end-to-end encryption.
Autocrypt private Module data.
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.
void dispatcher_flush_on_error(int rv)
Flush pending keys after a dispatch error.
@ 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 AliasFunctionData *fdata, 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.
@ MODULE_ID_AUTOCRYPT
ModuleAutocrypt, Autocrypt
Convenience wrapper for the library headers.
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
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.
Autocrypt private Module data.
struct MenuDefinition * menu_autocrypt
Autocrypt menu definition.
An event such as a keypress.
void * wdata
Private data.
Container for Accounts, Notifications.
@ MENU_AUTOCRYPT
Autocrypt Account menu.