Commit 1a956977 authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Remove redraw parameter from crypt send_menus.

The parameter was used to notify the caller if the sign (a)s menu was
invoked, which displayed the key selection menu.  This is no longer
necessary with the menu stack pop operation.
parent 95070a70
......@@ -1272,7 +1272,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */
crypt_opportunistic_encrypt (msg);
redraw_crypt_lines (msg);
}
msg->security = crypt_pgp_send_menu (msg, &menu->redraw);
msg->security = crypt_pgp_send_menu (msg);
redraw_crypt_lines (msg);
mutt_message_hook (NULL, msg, MUTT_SEND2HOOK);
break;
......@@ -1305,7 +1305,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */
crypt_opportunistic_encrypt (msg);
redraw_crypt_lines (msg);
}
msg->security = crypt_smime_send_menu(msg, &menu->redraw);
msg->security = crypt_smime_send_menu(msg);
redraw_crypt_lines (msg);
mutt_message_hook (NULL, msg, MUTT_SEND2HOOK);
break;
......
......@@ -4701,7 +4701,7 @@ void smime_gpgme_init (void)
init_smime ();
}
static int gpgme_send_menu (HEADER *msg, int *redraw, int is_smime)
static int gpgme_send_menu (HEADER *msg, int is_smime)
{
crypt_key_t *p;
char input_signas[SHORT_STRING];
......@@ -4806,7 +4806,6 @@ static int gpgme_send_menu (HEADER *msg, int *redraw, int is_smime)
msg->security |= SIGN;
}
*redraw = REDRAW_FULL;
break;
case 'b': /* (b)oth */
......@@ -4853,14 +4852,14 @@ static int gpgme_send_menu (HEADER *msg, int *redraw, int is_smime)
return (msg->security);
}
int pgp_gpgme_send_menu (HEADER *msg, int *redraw)
int pgp_gpgme_send_menu (HEADER *msg)
{
return gpgme_send_menu (msg, redraw, 0);
return gpgme_send_menu (msg, 0);
}
int smime_gpgme_send_menu (HEADER *msg, int *redraw)
int smime_gpgme_send_menu (HEADER *msg)
{
return gpgme_send_menu (msg, redraw, 1);
return gpgme_send_menu (msg, 1);
}
static int verify_sender (HEADER *h, gpgme_protocol_t protocol)
......
......@@ -48,8 +48,8 @@ BODY *smime_gpgme_sign_message (BODY *a);
int pgp_gpgme_verify_one (BODY *sigbdy, STATE *s, const char *tempfile);
int smime_gpgme_verify_one (BODY *sigbdy, STATE *s, const char *tempfile);
int pgp_gpgme_send_menu (HEADER *msg, int *redraw);
int smime_gpgme_send_menu (HEADER *msg, int *redraw);
int pgp_gpgme_send_menu (HEADER *msg);
int smime_gpgme_send_menu (HEADER *msg);
int smime_gpgme_verify_sender (HEADER *h);
......
......@@ -61,9 +61,9 @@ static int crypt_mod_pgp_verify_one (BODY *sigbdy, STATE *s, const char *tempf)
return pgp_verify_one (sigbdy, s, tempf);
}
static int crypt_mod_pgp_send_menu (HEADER *msg, int *redraw)
static int crypt_mod_pgp_send_menu (HEADER *msg)
{
return pgp_send_menu (msg, redraw);
return pgp_send_menu (msg);
}
static BODY *crypt_mod_pgp_encrypt_message (BODY *a, char *keylist, int sign)
......
......@@ -85,9 +85,9 @@ static int crypt_mod_pgp_verify_one (BODY *sigbdy, STATE *s, const char *tempf)
return pgp_gpgme_verify_one (sigbdy, s, tempf);
}
static int crypt_mod_pgp_send_menu (HEADER *msg, int *redraw)
static int crypt_mod_pgp_send_menu (HEADER *msg)
{
return pgp_gpgme_send_menu (msg, redraw);
return pgp_gpgme_send_menu (msg);
}
static BODY *crypt_mod_pgp_encrypt_message (BODY *a, char *keylist, int sign)
......
......@@ -61,9 +61,9 @@ static int crypt_mod_smime_verify_one (BODY *sigbdy, STATE *s, const char *tempf
return smime_verify_one (sigbdy, s, tempf);
}
static int crypt_mod_smime_send_menu (HEADER *msg, int *redraw)
static int crypt_mod_smime_send_menu (HEADER *msg)
{
return smime_send_menu (msg, redraw);
return smime_send_menu (msg);
}
static void crypt_mod_smime_getkeys (ENVELOPE *env)
......
......@@ -70,9 +70,9 @@ static int crypt_mod_smime_verify_one (BODY *sigbdy, STATE *s, const char *tempf
return smime_gpgme_verify_one (sigbdy, s, tempf);
}
static int crypt_mod_smime_send_menu (HEADER *msg, int *redraw)
static int crypt_mod_smime_send_menu (HEADER *msg)
{
return smime_gpgme_send_menu (msg, redraw);
return smime_gpgme_send_menu (msg);
}
static BODY *crypt_mod_smime_build_smime_entity (BODY *a, char *certlist)
......
......@@ -53,7 +53,7 @@ typedef int (*crypt_func_verify_one_t) (BODY *sigbdy, STATE *s,
typedef void (*crypt_func_pgp_extract_keys_from_attachment_list_t)
(FILE *fp, int tag, BODY *top);
typedef int (*crypt_func_send_menu_t) (HEADER *msg, int *redraw);
typedef int (*crypt_func_send_menu_t) (HEADER *msg);
/* (SMIME) */
typedef void (*crypt_func_smime_getkeys_t) (ENVELOPE *env);
......
......@@ -246,10 +246,10 @@ int crypt_pgp_verify_one (BODY *sigbdy, STATE *s, const char *tempf)
}
int crypt_pgp_send_menu (HEADER *msg, int *redraw)
int crypt_pgp_send_menu (HEADER *msg)
{
if (CRYPT_MOD_CALL_CHECK (PGP, send_menu))
return (CRYPT_MOD_CALL (PGP, send_menu)) (msg, redraw);
return (CRYPT_MOD_CALL (PGP, send_menu)) (msg);
return 0;
}
......@@ -380,10 +380,10 @@ int crypt_smime_verify_one (BODY *sigbdy, STATE *s, const char *tempf)
return -1;
}
int crypt_smime_send_menu (HEADER *msg, int *redraw)
int crypt_smime_send_menu (HEADER *msg)
{
if (CRYPT_MOD_CALL_CHECK (SMIME, send_menu))
return (CRYPT_MOD_CALL (SMIME, send_menu)) (msg, redraw);
return (CRYPT_MOD_CALL (SMIME, send_menu)) (msg);
return 0;
}
......
......@@ -239,7 +239,7 @@ BODY *crypt_pgp_encrypt_message (BODY *a, char *keylist, int sign);
/* Invoke the PGP command to import a key. */
void crypt_pgp_invoke_import (const char *fname);
int crypt_pgp_send_menu (HEADER *msg, int *redraw);
int crypt_pgp_send_menu (HEADER *msg);
/* fixme: needs documentation */
int crypt_pgp_verify_one (BODY *sigbdy, STATE *s, const char *tempf);
......@@ -289,7 +289,7 @@ BODY *crypt_smime_build_smime_entity (BODY *a, char *certlist);
/* Add a certificate and update index file (externally). */
void crypt_smime_invoke_import (char *infile, char *mailbox);
int crypt_smime_send_menu (HEADER *msg, int *redraw);
int crypt_smime_send_menu (HEADER *msg);
void crypt_smime_set_sender (const char *sender);
......
......@@ -1698,7 +1698,7 @@ BODY *pgp_traditional_encryptsign (BODY *a, int flags, char *keylist)
return b;
}
int pgp_send_menu (HEADER *msg, int *redraw)
int pgp_send_menu (HEADER *msg)
{
pgp_key_t p;
char input_signas[SHORT_STRING];
......@@ -1826,7 +1826,6 @@ int pgp_send_menu (HEADER *msg, int *redraw)
crypt_pgp_void_passphrase (); /* probably need a different passphrase */
}
*redraw = REDRAW_FULL;
break;
case 'b': /* (b)oth */
......
......@@ -104,6 +104,6 @@ BODY *pgp_traditional_encryptsign (BODY *, int, char *);
BODY *pgp_encrypt_message (BODY *, char *, int);
BODY *pgp_sign_message (BODY *);
int pgp_send_menu (HEADER *msg, int *redraw);
int pgp_send_menu (HEADER *msg);
#endif /* CRYPT_BACKEND_CLASSIC_PGP */
......@@ -2090,7 +2090,7 @@ int smime_application_smime_handler (BODY *m, STATE *s)
return smime_handle_entity (m, s, NULL) ? 0 : -1;
}
int smime_send_menu (HEADER *msg, int *redraw)
int smime_send_menu (HEADER *msg)
{
smime_key_t *key;
char *prompt, *letters, *choices;
......@@ -2218,8 +2218,6 @@ int smime_send_menu (HEADER *msg, int *redraw)
case 'S': /* (s)ign in oppenc mode */
if(!SmimeDefaultKey)
{
*redraw = REDRAW_FULL;
if ((key = smime_ask_for_key (_("Sign as: "), KEYFLAG_CANSIGN, 0)))
{
mutt_str_replace (&SmimeDefaultKey, key->hash);
......@@ -2246,7 +2244,6 @@ int smime_send_menu (HEADER *msg, int *redraw)
crypt_smime_void_passphrase ();
}
*redraw = REDRAW_FULL;
break;
case 'b': /* (b)oth */
......
......@@ -63,7 +63,7 @@ char *smime_findKeys (ADDRESS *adrlist, int oppenc_mode);
void smime_invoke_import (char *, char *);
int smime_send_menu (HEADER *msg, int *redraw);
int smime_send_menu (HEADER *msg);
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment