X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=keymap.c;h=5e32da094ff3886e9b5c7ce5193a72bc2335aca4;hb=5fbd8a74d24624a118c9b835b136c73b8da076d7;hp=17ee21fdedf94ce71733564ba690818cba5a87bc;hpb=9468c36e7656e50a91f759e3f5498b7f86dbec30;p=apps%2Fmadmutt.git diff --git a/keymap.c b/keymap.c index 17ee21f..5e32da0 100644 --- a/keymap.c +++ b/keymap.c @@ -14,7 +14,7 @@ #include "mutt.h" #include "keymap.h" -#include +#include "crypt.h" #define MUTT_FUNCTIONS_VALUES #include "functions.def" @@ -36,7 +36,6 @@ struct mapping_t Menus[] = { {"key_select_smime", MENU_KEY_SELECT_SMIME}, #endif - {"mix", MENU_MIX}, {"query", MENU_QUERY}, {"generic", MENU_GENERIC}, {NULL, 0} @@ -57,7 +56,7 @@ static struct mapping_t KeyNames[] = { #ifdef KEY_ENTER {"", KEY_ENTER}, #endif - {"", M_ENTER_C}, + {"", '\n'}, {"", '\033'}, {"", '\t'}, {"", ' '}, @@ -335,12 +334,12 @@ int km_dokey (int menu) for (;;) { /* ncurses doesn't return on resized screen when timeout is set to zero */ if (menu != MENU_EDITOR) - timeout ((Timeout > 0 ? Timeout : 60) * 1000); + wtimeout (stdscr, (Timeout > 0 ? Timeout : 60) * 1000); tmp = mutt_getch (); if (menu != MENU_EDITOR) - timeout (-1); /* restore blocking operation */ + wtimeout (stdscr, -1); /* restore blocking operation */ LastKey = tmp.ch; if (LastKey == -1) @@ -501,17 +500,8 @@ void km_init (void) create_bindings (OpAlias, MENU_ALIAS); create_bindings (OpPgp, MENU_PGP); create_bindings (OpSmime, MENU_SMIME); - -#ifdef CRYPT_BACKEND_GPGME create_bindings (OpPgp, MENU_KEY_SELECT_PGP); create_bindings (OpSmime, MENU_KEY_SELECT_SMIME); -#endif - - create_bindings (OpMix, MENU_MIX); - - km_bindkey ("", MENU_MIX, OP_GENERIC_SELECT_ENTRY); - km_bindkey ("h", MENU_MIX, OP_MIX_CHAIN_PREV); - km_bindkey ("l", MENU_MIX, OP_MIX_CHAIN_NEXT); /* bindings for the line editor */ create_bindings (OpEditor, MENU_EDITOR); @@ -720,16 +710,10 @@ struct binding_t *km_get_table (int menu) return OpQuery; case MENU_PGP: return OpPgp; - -#ifdef CRYPT_BACKEND_GPGME case MENU_KEY_SELECT_PGP: return OpPgp; case MENU_KEY_SELECT_SMIME: return OpSmime; -#endif - - case MENU_MIX: - return OpMix; } return NULL; } @@ -873,9 +857,9 @@ void mutt_what_key (void) { int ch; - mvprintw (LINES - 1, 0, _("Enter keys (^G to abort): ")); + mvwprintw (stdscr, LINES - 1, 0, _("Enter keys (^G to abort): ")); do { - ch = getch (); + ch = wgetch (stdscr); if (ch != ERR && ch != ctrl ('G')) { mutt_message (_("Char = %s, Octal = %o, Decimal = %d"), km_keyname (ch), ch, ch);