]> granicus.if.org Git - neomutt/commitdiff
Fix mutt/2004; S/MIME user interface differences between GPGME and
authorTAKAHASHI Tamotsu <ttakah@lapis.plala.or.jp>
Thu, 28 Jul 2005 20:42:45 +0000 (20:42 +0000)
committerTAKAHASHI Tamotsu <ttakah@lapis.plala.or.jp>
Thu, 28 Jul 2005 20:42:45 +0000 (20:42 +0000)
classic.

crypt-gpgme.c

index 3f7bf38f4e7e4c291e5f190ed413141ff76f9a13..33e34a5a30d39f0651fff8fae959809701c266af 100644 (file)
@@ -4121,21 +4121,23 @@ static int gpgme_send_menu (HEADER *msg, int *redraw, int is_smime)
 
   if (is_smime)
     choice = mutt_multi_choice (
-    _("S/MIME (e)ncrypt, (s)ign, sign (a)s, (b)oth, (t)oggle or (f)orget it?"),
-             _("esabtf"));
+    _("S/MIME (e)ncrypt, (s)ign, sign (a)s, (b)oth, (p)gp or (c)lear?"),
+             _("esabpfc"));
   else 
     choice = mutt_multi_choice (
-    _("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (t)oggle or (f)orget it?"),
-                _("esabtf"));
+    _("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, s/(m)ime or (c)lear?"),
+                _("esabmfc"));
 
   switch (choice)
   {
   case 1: /* (e)ncrypt */
     msg->security |= (is_smime ? SMIMEENCRYPT : PGPENCRYPT);
+    msg->security &= ~(is_smime ? SMIMESIGN : PGPSIGN);
     break;
 
   case 2: /* (s)ign */
     msg->security |= (is_smime? SMIMESIGN :PGPSIGN);
+    msg->security &= ~(is_smime ? SMIMEENCRYPT : PGPENCRYPT);
     break;
 
   case 3: /* sign (a)s */
@@ -4150,10 +4152,12 @@ static int gpgme_send_menu (HEADER *msg, int *redraw, int is_smime)
       
       msg->security |= (is_smime? SMIMESIGN:PGPSIGN);
     }
+#if 0
     else
     {
       msg->security &= (is_smime? ~SMIMESIGN : ~PGPSIGN);
     }
+#endif
     *redraw = REDRAW_FULL;
     break;
 
@@ -4161,16 +4165,17 @@ static int gpgme_send_menu (HEADER *msg, int *redraw, int is_smime)
     msg->security = (is_smime? (SMIMEENCRYPT|SMIMESIGN):(PGPENCRYPT|PGPSIGN));
     break;
 
-  case 5: /* (t)oggle */
+  case 5: /* (p)gp or s/(m)ime */
     is_smime = !is_smime;
     break;
 
   case 6: /* (f)orget it */
+  case 7: /* (c)lear */
     msg->security = 0;
     break;
   }
 
-  if (choice == 6)
+  if (choice == 6 || choice == 7)
     ;
   else if (is_smime)
     {