mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Basic autocrypt account menu.

Provide ability to create, delete, and toggle the prefer-encrypt and
enabled flag for an account.

Hook into the index via 'A' <autocrypt-acct-menu>.

+520 -8
+5
OPS
··· 3 3 OP_ATTACH_VIEW_MAILCAP "force viewing of attachment using mailcap" 4 4 OP_ATTACH_VIEW_TEXT "view attachment as text" 5 5 OP_ATTACH_COLLAPSE "Toggle display of subparts" 6 + OP_AUTOCRYPT_ACCT_MENU "manage autocrypt accounts" 7 + OP_AUTOCRYPT_CREATE_ACCT "create a new autocrypt account" 8 + OP_AUTOCRYPT_DELETE_ACCT "delete the current account" 9 + OP_AUTOCRYPT_TOGGLE_ACTIVE "toggle the current account active/inactive" 10 + OP_AUTOCRYPT_TOGGLE_PREFER "toggle the current account prefer-encrypt flag" 6 11 OP_BOTTOM_PAGE "move to the bottom of the page" 7 12 OP_BOUNCE_MESSAGE "remail a message to another user" 8 13 OP_BROWSER_NEW_FILE "select a new file in this directory"
+1 -1
autocrypt/Makefile.am
··· 8 8 noinst_LIBRARIES = libautocrypt.a 9 9 10 10 libautocrypt_a_SOURCES = autocrypt.c autocrypt.h autocrypt_db.c autocrypt_private.h \ 11 - autocrypt_schema.c autocrypt_gpgme.c 11 + autocrypt_schema.c autocrypt_gpgme.c autocrypt_acct_menu.c
+10 -5
autocrypt/autocrypt.c
··· 100 100 mutt_autocrypt_db_close (); 101 101 } 102 102 103 - /* Creates a brand new account the first time autocrypt is initialized */ 104 - int mutt_autocrypt_account_init (void) 103 + /* Creates a brand new account. 104 + * This is used the first time autocrypt is initialized, and 105 + * in the account menu. */ 106 + int mutt_autocrypt_account_init (int prompt) 105 107 { 106 108 ADDRESS *addr = NULL; 107 109 BUFFER *keyid = NULL, *keydata = NULL; 108 110 AUTOCRYPT_ACCOUNT *account = NULL; 109 111 int done = 0, rv = -1, prefer_encrypt = 0; 110 112 111 - dprint (1, (debugfile, "In mutt_autocrypt_account_init\n")); 112 - if (mutt_yesorno (_("Create an initial autocrypt account?"), 113 + if (prompt) 114 + { 115 + if (mutt_yesorno (_("Create an initial autocrypt account?"), 113 116 MUTT_YES) != MUTT_YES) 114 - return 0; 117 + return 0; 118 + } 115 119 116 120 keyid = mutt_buffer_pool_get (); 117 121 keydata = mutt_buffer_pool_get (); ··· 152 156 if (account) 153 157 { 154 158 mutt_error _("That email address already has an autocrypt account"); 159 + mutt_sleep (1); 155 160 goto cleanup; 156 161 } 157 162
+1
autocrypt/autocrypt.h
··· 80 80 int mutt_autocrypt_write_autocrypt_header (ENVELOPE *env, FILE *fp); 81 81 int mutt_autocrypt_write_gossip_headers (ENVELOPE *env, FILE *fp); 82 82 int mutt_autocrypt_generate_gossip_list (HEADER *hdr); 83 + void mutt_autocrypt_account_menu (void); 83 84 84 85 #endif
+282
autocrypt/autocrypt_acct_menu.c
··· 1 + /* 2 + * Copyright (C) 2019 Kevin J. McCarthy <kevin@8t8.us> 3 + * 4 + * This program is free software; you can redistribute it and/or modify 5 + * it under the terms of the GNU General Public License as published by 6 + * the Free Software Foundation; either version 2 of the License, or 7 + * (at your option) any later version. 8 + * 9 + * This program is distributed in the hope that it will be useful, 10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 + * GNU General Public License for more details. 13 + * 14 + * You should have received a copy of the GNU General Public License 15 + * along with this program; if not, write to the Free Software 16 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 + */ 18 + 19 + #if HAVE_CONFIG_H 20 + # include "config.h" 21 + #endif 22 + 23 + #include "mutt.h" 24 + #include "mutt_menu.h" 25 + #include "mutt_idna.h" 26 + 27 + #include "autocrypt.h" 28 + #include "autocrypt_private.h" 29 + 30 + typedef struct entry 31 + { 32 + int tagged; /* TODO */ 33 + int num; 34 + AUTOCRYPT_ACCOUNT *account; 35 + ADDRESS *addr; 36 + } ENTRY; 37 + 38 + static const struct mapping_t AutocryptAcctHelp[] = { 39 + { N_("Exit"), OP_EXIT }, 40 + /* L10N: Autocrypt Account Menu Help line: 41 + create new account 42 + */ 43 + { N_("Create"), OP_AUTOCRYPT_CREATE_ACCT }, 44 + /* L10N: Autocrypt Account Menu Help line: 45 + delete account 46 + */ 47 + { N_("Delete"), OP_AUTOCRYPT_DELETE_ACCT }, 48 + /* L10N: Autocrypt Account Menu Help line: 49 + toggle an account active/inactive 50 + */ 51 + { N_("Tgl Active"), OP_AUTOCRYPT_TOGGLE_ACTIVE }, 52 + /* L10N: Autocrypt Account Menu Help line: 53 + toggle "prefer-encrypt" on an account 54 + */ 55 + { N_("Prf Enc"), OP_AUTOCRYPT_TOGGLE_PREFER }, 56 + { N_("Help"), OP_HELP }, 57 + { NULL, 0 } 58 + }; 59 + 60 + static const char *account_format_str (char *dest, size_t destlen, size_t col, 61 + int cols, char op, const char *src, 62 + const char *fmt, const char *ifstring, 63 + const char *elsestring, 64 + unsigned long data, format_flag flags) 65 + { 66 + ENTRY *entry = (ENTRY *)data; 67 + char tmp[SHORT_STRING]; 68 + 69 + switch (op) 70 + { 71 + case 'a': 72 + mutt_format_s (dest, destlen, fmt, entry->addr->mailbox); 73 + break; 74 + case 'k': 75 + mutt_format_s (dest, destlen, fmt, entry->account->keyid); 76 + break; 77 + case 'n': 78 + snprintf (tmp, sizeof (tmp), "%%%sd", fmt); 79 + snprintf (dest, destlen, tmp, entry->num); 80 + break; 81 + case 'p': 82 + if (entry->account->prefer_encrypt) 83 + /* L10N: 84 + Autocrypt Account menu. 85 + flag that an account has prefer-encrypt set 86 + */ 87 + mutt_format_s (dest, destlen, fmt, _("prefer encrypt")); 88 + else 89 + /* L10N: 90 + Autocrypt Account menu. 91 + flag that an account has prefer-encrypt unset; 92 + thus encryption will need to be manually enabled. 93 + */ 94 + mutt_format_s (dest, destlen, fmt, _("manual encrypt")); 95 + break; 96 + case 's': 97 + if (entry->account->enabled) 98 + /* L10N: 99 + Autocrypt Account menu. 100 + flag that an account is enabled/active 101 + */ 102 + mutt_format_s (dest, destlen, fmt, _("active")); 103 + else 104 + /* L10N: 105 + Autocrypt Account menu. 106 + flag that an account is disabled/inactive 107 + */ 108 + mutt_format_s (dest, destlen, fmt, _("inactive")); 109 + break; 110 + } 111 + 112 + return (src); 113 + } 114 + 115 + static void account_entry (char *s, size_t slen, MUTTMENU *m, int num) 116 + { 117 + ENTRY *entry = &((ENTRY *) m->data)[num]; 118 + 119 + mutt_FormatString (s, slen, 0, MuttIndexWindow->cols, 120 + NONULL (AutocryptAcctFormat), account_format_str, 121 + (unsigned long) entry, MUTT_FORMAT_ARROWCURSOR); 122 + } 123 + 124 + static MUTTMENU *create_menu () 125 + { 126 + MUTTMENU *menu = NULL; 127 + AUTOCRYPT_ACCOUNT **accounts = NULL; 128 + ENTRY *entries = NULL; 129 + int num_accounts = 0, i; 130 + char *helpstr; 131 + 132 + if (mutt_autocrypt_db_account_get_all (&accounts, &num_accounts) < 0) 133 + return NULL; 134 + 135 + menu = mutt_new_menu (MENU_AUTOCRYPT_ACCT); 136 + menu->make_entry = account_entry; 137 + /* menu->tag = account_tag; */ 138 + /* L10N: 139 + Autocrypt Account Management Menu title 140 + */ 141 + menu->title = _("Autocrypt Accounts"); 142 + helpstr = safe_malloc (STRING); 143 + menu->help = mutt_compile_help (helpstr, STRING, MENU_AUTOCRYPT_ACCT, 144 + AutocryptAcctHelp); 145 + 146 + menu->data = entries = safe_calloc (num_accounts, sizeof(ENTRY)); 147 + menu->max = num_accounts; 148 + 149 + for (i = 0; i < num_accounts; i++) 150 + { 151 + entries[i].num = i + 1; 152 + /* note: we are transfering the account pointer to the entries 153 + * array, and freeing the accounts array below. the account 154 + * will be freed in free_menu(). 155 + */ 156 + entries[i].account = accounts[i]; 157 + 158 + entries[i].addr = rfc822_new_address (); 159 + entries[i].addr->mailbox = safe_strdup (accounts[i]->email_addr); 160 + mutt_addrlist_to_local (entries[i].addr); 161 + } 162 + FREE (&accounts); 163 + 164 + mutt_push_current_menu (menu); 165 + 166 + return menu; 167 + } 168 + 169 + static void free_menu (MUTTMENU **menu) 170 + { 171 + int i; 172 + ENTRY *entries; 173 + 174 + entries = (ENTRY *)(*menu)->data; 175 + for (i = 0; i < (*menu)->max; i++) 176 + { 177 + mutt_autocrypt_db_account_free (&entries[i].account); 178 + rfc822_free_address (&entries[i].addr); 179 + } 180 + FREE (&(*menu)->data); 181 + 182 + mutt_pop_current_menu (*menu); 183 + FREE (&(*menu)->help); 184 + mutt_menuDestroy (menu); 185 + } 186 + 187 + static void toggle_active (ENTRY *entry) 188 + { 189 + entry->account->enabled = !entry->account->enabled; 190 + if (mutt_autocrypt_db_account_update (entry->account) != 0) 191 + { 192 + entry->account->enabled = !entry->account->enabled; 193 + mutt_error _("Error updating account record"); 194 + } 195 + } 196 + 197 + static void toggle_prefer_encrypt (ENTRY *entry) 198 + { 199 + entry->account->prefer_encrypt = !entry->account->prefer_encrypt; 200 + if (mutt_autocrypt_db_account_update (entry->account)) 201 + { 202 + entry->account->prefer_encrypt = !entry->account->prefer_encrypt; 203 + mutt_error _("Error updating account record"); 204 + } 205 + } 206 + 207 + void mutt_autocrypt_account_menu (void) 208 + { 209 + MUTTMENU *menu; 210 + int done = 0, op; 211 + ENTRY *entry; 212 + char msg[SHORT_STRING]; 213 + 214 + if (!option (OPTAUTOCRYPT)) 215 + return; 216 + 217 + if (mutt_autocrypt_init (0)) 218 + return; 219 + 220 + menu = create_menu (); 221 + if (!menu) 222 + return; 223 + 224 + while (!done) 225 + { 226 + switch ((op = mutt_menuLoop (menu))) 227 + { 228 + case OP_EXIT: 229 + done = 1; 230 + break; 231 + 232 + case OP_AUTOCRYPT_CREATE_ACCT: 233 + if (!mutt_autocrypt_account_init (0)) 234 + { 235 + free_menu (&menu); 236 + menu = create_menu (); 237 + } 238 + break; 239 + 240 + case OP_AUTOCRYPT_DELETE_ACCT: 241 + if (menu->data) 242 + { 243 + entry = (ENTRY *)(menu->data) + menu->current; 244 + snprintf (msg, sizeof(msg), 245 + /* L10N: 246 + Confirms deleting an autocrypt account 247 + */ 248 + _("Really delete account \"%s\"?"), 249 + entry->addr->mailbox); 250 + if (mutt_yesorno (msg, MUTT_NO) != MUTT_YES) 251 + break; 252 + 253 + if (!mutt_autocrypt_db_account_delete (entry->account)) 254 + { 255 + free_menu (&menu); 256 + menu = create_menu (); 257 + } 258 + } 259 + break; 260 + 261 + case OP_AUTOCRYPT_TOGGLE_ACTIVE: 262 + if (menu->data) 263 + { 264 + entry = (ENTRY *)(menu->data) + menu->current; 265 + toggle_active (entry); 266 + menu->redraw |= REDRAW_FULL; 267 + } 268 + break; 269 + 270 + case OP_AUTOCRYPT_TOGGLE_PREFER: 271 + if (menu->data) 272 + { 273 + entry = (ENTRY *)(menu->data) + menu->current; 274 + toggle_prefer_encrypt (entry); 275 + menu->redraw |= REDRAW_FULL; 276 + } 277 + break; 278 + } 279 + } 280 + 281 + free_menu (&menu); 282 + }
+160 -1
autocrypt/autocrypt_db.c
··· 28 28 /* Prepared statements */ 29 29 static sqlite3_stmt *AccountGetStmt; 30 30 static sqlite3_stmt *AccountInsertStmt; 31 + static sqlite3_stmt *AccountUpdateStmt; 32 + static sqlite3_stmt *AccountDeleteStmt; 31 33 static sqlite3_stmt *PeerGetStmt; 32 34 static sqlite3_stmt *PeerInsertStmt; 33 35 static sqlite3_stmt *PeerUpdateStmt; ··· 74 76 if (autocrypt_db_create (mutt_b2s (db_path))) 75 77 goto cleanup; 76 78 /* Don't abort the whole init process because account creation failed */ 77 - mutt_autocrypt_account_init (); 79 + mutt_autocrypt_account_init (1); 78 80 } 79 81 else 80 82 { ··· 108 110 AccountGetStmt = NULL; 109 111 sqlite3_finalize (AccountInsertStmt); 110 112 AccountInsertStmt = NULL; 113 + sqlite3_finalize (AccountUpdateStmt); 114 + AccountUpdateStmt = NULL; 115 + sqlite3_finalize (AccountDeleteStmt); 116 + AccountDeleteStmt = NULL; 111 117 112 118 sqlite3_finalize (PeerGetStmt); 113 119 PeerGetStmt = NULL; ··· 304 310 cleanup: 305 311 rfc822_free_address (&norm_addr); 306 312 sqlite3_reset (AccountInsertStmt); 313 + return rv; 314 + } 315 + 316 + int mutt_autocrypt_db_account_update (AUTOCRYPT_ACCOUNT *acct) 317 + { 318 + int rv = -1; 319 + 320 + if (!AccountUpdateStmt) 321 + { 322 + if (sqlite3_prepare_v3 ( 323 + AutocryptDB, 324 + "UPDATE account SET " 325 + "keyid = ?, " 326 + "keydata = ?, " 327 + "prefer_encrypt = ?, " 328 + "enabled = ? " 329 + "WHERE email_addr = ?;", 330 + -1, 331 + SQLITE_PREPARE_PERSISTENT, 332 + &AccountUpdateStmt, 333 + NULL) != SQLITE_OK) 334 + goto cleanup; 335 + } 336 + 337 + if (sqlite3_bind_text (AccountUpdateStmt, 338 + 1, 339 + acct->keyid, 340 + -1, 341 + SQLITE_STATIC) != SQLITE_OK) 342 + goto cleanup; 343 + if (sqlite3_bind_text (AccountUpdateStmt, 344 + 2, 345 + acct->keydata, 346 + -1, 347 + SQLITE_STATIC) != SQLITE_OK) 348 + goto cleanup; 349 + if (sqlite3_bind_int (AccountUpdateStmt, 350 + 3, 351 + acct->prefer_encrypt) != SQLITE_OK) 352 + goto cleanup; 353 + if (sqlite3_bind_int (AccountUpdateStmt, 354 + 4, 355 + acct->enabled) != SQLITE_OK) 356 + goto cleanup; 357 + if (sqlite3_bind_text (AccountUpdateStmt, 358 + 5, 359 + acct->email_addr, 360 + -1, 361 + SQLITE_STATIC) != SQLITE_OK) 362 + goto cleanup; 363 + 364 + if (sqlite3_step (AccountUpdateStmt) != SQLITE_DONE) 365 + goto cleanup; 366 + 367 + rv = 0; 368 + 369 + cleanup: 370 + sqlite3_reset (AccountUpdateStmt); 371 + return rv; 372 + } 373 + 374 + int mutt_autocrypt_db_account_delete (AUTOCRYPT_ACCOUNT *acct) 375 + { 376 + int rv = -1; 377 + 378 + if (!AccountDeleteStmt) 379 + { 380 + if (sqlite3_prepare_v3 ( 381 + AutocryptDB, 382 + "DELETE from account " 383 + "WHERE email_addr = ?;", 384 + -1, 385 + SQLITE_PREPARE_PERSISTENT, 386 + &AccountDeleteStmt, 387 + NULL) != SQLITE_OK) 388 + goto cleanup; 389 + } 390 + 391 + if (sqlite3_bind_text (AccountDeleteStmt, 392 + 1, 393 + acct->email_addr, 394 + -1, 395 + SQLITE_STATIC) != SQLITE_OK) 396 + goto cleanup; 397 + 398 + if (sqlite3_step (AccountDeleteStmt) != SQLITE_DONE) 399 + goto cleanup; 400 + 401 + rv = 0; 402 + 403 + cleanup: 404 + sqlite3_reset (AccountDeleteStmt); 405 + return rv; 406 + } 407 + 408 + int mutt_autocrypt_db_account_get_all (AUTOCRYPT_ACCOUNT ***accounts, int *num_accounts) 409 + { 410 + int rv = -1, result; 411 + sqlite3_stmt *stmt = NULL; 412 + AUTOCRYPT_ACCOUNT **results = NULL, *account; 413 + int results_len = 0, results_count = 0; 414 + 415 + *accounts = NULL; 416 + *num_accounts = 0; 417 + 418 + /* Note, speed is not of the essence for the account management screen, 419 + * so we don't bother with a persistent prepared statement */ 420 + if (sqlite3_prepare_v2 ( 421 + AutocryptDB, 422 + "SELECT " 423 + "email_addr, " 424 + "keyid, " 425 + "keydata, " 426 + "prefer_encrypt, " 427 + "enabled " 428 + "FROM account " 429 + "ORDER BY email_addr", 430 + -1, 431 + &stmt, 432 + NULL) != SQLITE_OK) 433 + goto cleanup; 434 + 435 + while ((result = sqlite3_step (stmt)) == SQLITE_ROW) 436 + { 437 + if (results_count == results_len) 438 + { 439 + results_len += 5; 440 + safe_realloc (&results, results_len * sizeof(AUTOCRYPT_ACCOUNT *)); 441 + } 442 + 443 + results[results_count++] = account = mutt_autocrypt_db_account_new (); 444 + 445 + account->email_addr = strdup_column_text (stmt, 0); 446 + account->keyid = strdup_column_text (stmt, 1); 447 + account->keydata = strdup_column_text (stmt, 2); 448 + account->prefer_encrypt = sqlite3_column_int (stmt, 3); 449 + account->enabled = sqlite3_column_int (stmt, 4); 450 + } 451 + 452 + if (result == SQLITE_DONE) 453 + { 454 + *accounts = results; 455 + rv = *num_accounts = results_count; 456 + } 457 + else 458 + { 459 + while (results_count > 0) 460 + mutt_autocrypt_db_account_free (&results[--results_count]); 461 + FREE (&results); 462 + } 463 + 464 + cleanup: 465 + sqlite3_finalize (stmt); 307 466 return rv; 308 467 } 309 468
+4 -1
autocrypt/autocrypt_private.h
··· 21 21 22 22 #include <sqlite3.h> 23 23 24 - int mutt_autocrypt_account_init (void); 24 + int mutt_autocrypt_account_init (int prompt); 25 25 26 26 int mutt_autocrypt_db_init (int can_create); 27 27 void mutt_autocrypt_db_close (void); ··· 33 33 int mutt_autocrypt_db_account_get (ADDRESS *addr, AUTOCRYPT_ACCOUNT **account); 34 34 int mutt_autocrypt_db_account_insert (ADDRESS *addr, const char *keyid, 35 35 const char *keydata, int prefer_encrypt); 36 + int mutt_autocrypt_db_account_update (AUTOCRYPT_ACCOUNT *acct); 37 + int mutt_autocrypt_db_account_delete (AUTOCRYPT_ACCOUNT *acct); 38 + int mutt_autocrypt_db_account_get_all (AUTOCRYPT_ACCOUNT ***accounts, int *num_accounts); 36 39 37 40 AUTOCRYPT_PEER *mutt_autocrypt_db_peer_new (void); 38 41 void mutt_autocrypt_db_peer_free (AUTOCRYPT_PEER **peer);
+11
curs_main.c
··· 45 45 #include "monitor.h" 46 46 #endif 47 47 48 + #ifdef USE_AUTOCRYPT 49 + #include "autocrypt.h" 50 + #endif 51 + 48 52 #include "mutt_crypt.h" 49 53 50 54 ··· 2562 2566 mutt_reflow_windows(); 2563 2567 break; 2564 2568 #endif 2569 + 2570 + #ifdef USE_AUTOCRYPT 2571 + case OP_AUTOCRYPT_ACCT_MENU: 2572 + mutt_autocrypt_account_menu (); 2573 + break; 2574 + #endif 2575 + 2565 2576 default: 2566 2577 if (menu->menu == MENU_MAIN) 2567 2578 km_error_key (MENU_MAIN);
+1
doc/manual.xml.tail
··· 24 24 __print_map(smime) 25 25 __print_map(mixmaster) 26 26 __print_map(editor) 27 + __print_map(autocrypt account) 27 28 28 29 </sect1> 29 30
+13
functions.h
··· 86 86 87 87 const struct binding_t OpMain[] = { /* map: index */ 88 88 { "create-alias", OP_CREATE_ALIAS, "a" }, 89 + #ifdef USE_AUTOCRYPT 90 + { "autocrypt-acct-menu", OP_AUTOCRYPT_ACCT_MENU, "A" }, 91 + #endif 89 92 { "bounce-message", OP_BOUNCE_MESSAGE, "b" }, 90 93 { "break-thread", OP_MAIN_BREAK_THREAD, "#" }, 91 94 { "change-folder", OP_MAIN_CHANGE_FOLDER, "c" }, ··· 500 503 { NULL, 0, NULL } 501 504 }; 502 505 #endif /* MIXMASTER */ 506 + 507 + #ifdef USE_AUTOCRYPT 508 + const struct binding_t OpAutocryptAcct[] = { /* map: autocrypt account */ 509 + { "create-account", OP_AUTOCRYPT_CREATE_ACCT, "c" }, 510 + { "delete-account", OP_AUTOCRYPT_DELETE_ACCT, "D" }, 511 + { "toggle-active", OP_AUTOCRYPT_TOGGLE_ACTIVE, "a" }, 512 + { "toggle-prefer-encrypt", OP_AUTOCRYPT_TOGGLE_PREFER, "p" }, 513 + { NULL, 0, NULL } 514 + }; 515 + #endif
+1
globals.h
··· 41 41 WHERE char *AttachCharset; 42 42 WHERE char *AttachFormat; 43 43 #ifdef USE_AUTOCRYPT 44 + WHERE char *AutocryptAcctFormat; 44 45 WHERE char *AutocryptDir; 45 46 WHERE char *AutocryptSignAs; /* This is used in crypt-gpgme.c */ 46 47 WHERE char *AutocryptDefaultKey; /* Used for postponing messages */
+14
init.h
··· 325 325 ** passive encryption protection with keys exchanged via headers. 326 326 ** TODO: add a section in the manual describing this is more detail. 327 327 */ 328 + { "autocrypt_acct_format", DT_STR, R_MENU, {.p=&AutocryptAcctFormat}, {.p="%4n %-30a %20p %10s"} }, 329 + /* 330 + ** .pp 331 + ** This variable describes the format of the ``autocrypt account'' menu. 332 + ** The following \fCprintf(3)\fP-style sequences are understood 333 + ** .dl 334 + ** .dt %a .dd email address 335 + ** .dt %k .dd gpg keyid 336 + ** .dt %n .dd current entry number 337 + ** .dt %p .dd prefer-encrypt flag 338 + ** .dt %s .dd status flag (active/inactive) 339 + ** .de 340 + ** .pp 341 + */ 328 342 { "autocrypt_dir", DT_PATH, R_NONE, {.p=&AutocryptDir}, {.p="~/.mutt/autocrypt"} }, 329 343 /* 330 344 ** .pp
+9
keymap.c
··· 770 770 km_bindkey ("l", MENU_MIX, OP_MIX_CHAIN_NEXT); 771 771 #endif 772 772 773 + #ifdef USE_AUTOCRYPT 774 + create_bindings (OpAutocryptAcct, MENU_AUTOCRYPT_ACCT); 775 + #endif 776 + 773 777 /* bindings for the line editor */ 774 778 create_bindings (OpEditor, MENU_EDITOR); 775 779 ··· 1025 1029 #ifdef MIXMASTER 1026 1030 case MENU_MIX: 1027 1031 return OpMix; 1032 + #endif 1033 + 1034 + #ifdef USE_AUTOCRYPT 1035 + case MENU_AUTOCRYPT_ACCT: 1036 + return OpAutocryptAcct; 1028 1037 #endif 1029 1038 1030 1039 }
+7
keymap.h
··· 77 77 MENU_MIX, 78 78 #endif 79 79 80 + #ifdef USE_AUTOCRYPT 81 + MENU_AUTOCRYPT_ACCT, 82 + #endif 80 83 81 84 82 85 MENU_MAX ··· 116 119 117 120 #ifdef MIXMASTER 118 121 extern const struct binding_t OpMix[]; 122 + #endif 123 + 124 + #ifdef USE_AUTOCRYPT 125 + extern const struct binding_t OpAutocryptAcct[]; 119 126 #endif 120 127 121 128 #include "keymap_defs.h"
+1
po/POTFILES.in
··· 4 4 attach.c 5 5 autocrypt/autocrypt.c 6 6 autocrypt/autocrypt_db.c 7 + autocrypt/autocrypt_acct_menu.c 7 8 autocrypt/autocrypt_gpgme.c 8 9 autocrypt/autocrypt_schema.c 9 10 browser.c