Show
Ignore:
Timestamp:
2004-04-12 14:19:27 (5 years ago)
Author:
Dale Woolridge <dale-list-mutt-dev-2@…>
Branch:
HEAD
Message:

See: http://does-not-exist.org/mail-archives/mutt-dev/msg00843.html

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • compose.c

    r3495 r3652  
    132132  else 
    133133    addstr (_("Clear")); 
     134 
     135  if ((WithCrypto & APPLICATION_PGP)) 
     136    if ((msg->security & (ENCRYPT | SIGN))) 
     137    { 
     138      if ((msg->security & INLINE)) 
     139        addstr (_(" (inline)")); 
     140      else 
     141        addstr (_(" (PGP/MIME)")); 
     142    } 
    134143  clrtoeol (); 
    135144 
     
    163172    return msg->security; 
    164173 
    165   switch (mutt_multi_choice (_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "), 
    166                              _("esabf"))) 
     174  switch (mutt_multi_choice (_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "), 
     175                             _("esabif"))) 
    167176  { 
    168177  case 1: /* (e)ncrypt */ 
    169     msg->security |= ENCRYPT; 
     178    msg->security ^= ENCRYPT; 
    170179    break; 
    171180 
    172181  case 2: /* (s)ign */ 
    173     msg->security |= SIGN; 
     182    msg->security ^= SIGN; 
    174183    break; 
    175184 
     
    198207 
    199208  case 4: /* (b)oth */ 
    200     msg->security = ENCRYPT | SIGN; 
     209    if ((msg->security & (ENCRYPT | SIGN)) == (ENCRYPT | SIGN)) 
     210      msg->security = 0; 
     211    else 
     212      msg->security |= (ENCRYPT | SIGN); 
    201213    break; 
    202214 
    203   case 5: /* (f)orget it */ 
     215  case 5: /* (i)nline */ 
     216    if ((msg->security & (ENCRYPT | SIGN))) 
     217      msg->security ^= INLINE; 
     218    else 
     219      msg->security &= ~INLINE; 
     220    break; 
     221 
     222  case 6: /* (f)orget it */ 
    204223    msg->security = 0; 
    205224    break; 
    206225  } 
    207226 
    208   if (msg->security && msg->security != APPLICATION_PGP) 
    209     msg->security |= APPLICATION_PGP; 
    210   else 
    211     msg->security = 0; 
     227  if (msg->security) 
     228  { 
     229    if (! (msg->security & (ENCRYPT | SIGN))) 
     230      msg->security = 0; 
     231    else 
     232      msg->security |= APPLICATION_PGP; 
     233  } 
    212234 
    213235  if(*redraw)