]> granicus.if.org Git - mutt/commitdiff
Remove redraw parameter from crypt send_menus.
authorKevin McCarthy <kevin@8t8.us>
Mon, 27 Mar 2017 01:31:43 +0000 (18:31 -0700)
committerKevin McCarthy <kevin@8t8.us>
Mon, 27 Mar 2017 01:31:43 +0000 (18:31 -0700)
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.

14 files changed:
compose.c
crypt-gpgme.c
crypt-gpgme.h
crypt-mod-pgp-classic.c
crypt-mod-pgp-gpgme.c
crypt-mod-smime-classic.c
crypt-mod-smime-gpgme.c
crypt-mod.h
cryptglue.c
mutt_crypt.h
pgp.c
pgp.h
smime.c
smime.h

index 94da43d3e40a4f12b8b1582e5eb175c4bcdadafc..6bce097f37110edd432ece4686ffb29377374345 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -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;
index 7b010d0f9361d06c1a9294a1397f2e760f3c00c0..0c71c2f65755384fb49dc4e558a9d87927a9fa97 100644 (file)
@@ -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)
index 7f5ecda372af6e1237333087352a3df280f7b05a..78a98410e2f6d79eb1db3b4df6bdbf52114ff266 100644 (file)
@@ -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);
 
index 2f69dcdc5f48c361bcbc22e327c146ab79f4b041..cb7f873c01b26dd34deb37cde7177d98b4b8d392 100644 (file)
@@ -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)
index 183f4eeec91181560819b61a9d76154421b28ad6..a3ed1cecdd99600ffef7a96a3e5fe2c6e2460dc5 100644 (file)
@@ -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)
index c09db9c719eda2db32318ead3af420d5f5eb3be2..b671b92665839dab3184edcaff852057bd4d1026 100644 (file)
@@ -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)
index ec1b2ba652af3e6204659465e8d82899f2ee9137..a306363208440e938ca1d0546f816202fa10fb07 100644 (file)
@@ -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)
index 70910eee279cef0a186a698590cb3f85c4e1f7f6..da914029c0c6a88ba853e89c086ee8659ca8601d 100644 (file)
@@ -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);
index b8b8a56ae82083d15664f087f6a752e391196e94..fbe51bd79cf1048addad6a0d8cb83f2c178e6770 100644 (file)
@@ -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;
 }
index 131daccd92c8060dfee1bba7580f96d37b7c703a..07c406d37dedae15c9af5e711f184b161108f3f9 100644 (file)
@@ -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);
 
diff --git a/pgp.c b/pgp.c
index 6a6f3c91b5fc11c47bb3437af58d7e37f107a810..a531c1f21514c73fcf2840f74f082965f0e62215 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -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 */
diff --git a/pgp.h b/pgp.h
index 6f9250688511ce60b362583ca4b4256d39d85d24..05fc6b00006be8e1714b3143d039ea94e3c880a5 100644 (file)
--- a/pgp.h
+++ b/pgp.h
@@ -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 */
diff --git a/smime.c b/smime.c
index 93dba754d3fdfd2f700126bcc9368af2c80bf020..8205e6dca4e90473351cd3e6dedbe23d4313fcb1 100644 (file)
--- a/smime.c
+++ b/smime.c
@@ -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 */
diff --git a/smime.h b/smime.h
index 22f03028321691ee861a4a350005184c84983070..3eb4c6527b3529037210fd3fd18de9741d9122ef 100644 (file)
--- a/smime.h
+++ b/smime.h
@@ -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