<<< Date Index >>>     <<< Thread Index >>>

[PATCH] Compose menu prints "Encrypt with" field also if it is empty



Hello,

The following patch makes Mutt print the "Encrypt with" field only in
case the used S/MIME module supports this feature (by provides
additional information through the SmimeCryptAlg variable).

2004-08-12  Moritz Schulte  <moritz@xxxxxxxxxxx>

        * compose.c (redraw_crypt_lines): Only print "Encrypt with" field
        in case the used S/MIME modules supports this feature.

diff -u -p -r3.17 compose.c
--- compose.c   14 Jul 2004 05:39:23 -0000      3.17
+++ compose.c   12 Aug 2004 15:25:01 -0000
@@ -155,7 +155,10 @@ static void redraw_crypt_lines (HEADER *
   }
 
   if ((WithCrypto & APPLICATION_SMIME)
-       && msg->security & APPLICATION_SMIME  && (msg->security & ENCRYPT)) {
+      && (msg->security & APPLICATION_SMIME)
+      && (msg->security & ENCRYPT)
+      && SmimeCryptAlg
+      && *SmimeCryptAlg) {
       mvprintw (HDR_CRYPTINFO, 40, "%s%s", _("Encrypt with: "),
                NONULL(SmimeCryptAlg));
       off = 20;

Attachment: pgpZvnoFXJQJx.pgp
Description: PGP signature