Show
Ignore:
Timestamp:
2003-03-03 00:26:20 (6 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

Introduce a new option named $bounce, and fix some inconsistencies
in the messages created when bouncing. Based on work done by Thomas
Glanzmann <sithglan@…>.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • commands.c

    r3307 r3309  
    258258 
    259259#define extra_space (15 + 7 + 2) 
    260   /* 
    261    * This is the printing width of "...? ([y=yes]/n=no): ?" plus 2 
    262    * for good measure. This is not ideal. FIXME. 
    263    *  
    264    * While you fix this, please go to recvcmd.c, and do the same thing there. 
    265    */ 
    266   snprintf (prompt, sizeof (prompt) - 4, 
     260  snprintf (prompt, sizeof (prompt), 
    267261           (h ? _("Bounce message to %s") : _("Bounce messages to %s")), buf); 
    268   mutt_format_string (prompt, sizeof (prompt) - 4, 
    269                       0, COLS-extra_space, 0, 0, 
    270                       prompt, sizeof (prompt), 0); 
    271   strcat (prompt, "...?");      /* __STRCAT_CHECKED__ */ 
    272   if (mutt_yesorno (prompt, M_YES) != M_YES) 
     262 
     263  if (mutt_strwidth (prompt) > COLS - extra_space) 
     264  { 
     265    mutt_format_string (prompt, sizeof (prompt), 
     266                        0, COLS-extra_space, 0, 0, 
     267                        prompt, sizeof (prompt), 0); 
     268    strncat (prompt, "...?", sizeof (prompt)); 
     269  } 
     270  else 
     271    strncat (prompt, "?", sizeof (prompt)); 
     272 
     273  if (query_quadoption (OPT_BOUNCE, prompt) == M_NO) 
    273274  { 
    274275    rfc822_free_address (&adr); 
    275     CLEARLINE (LINES-1); 
     276    CLEARLINE (LINES - 1); 
     277    mutt_message (h ? _("Message not bounced.") : _("Messages not bounced.")); 
    276278    return; 
    277279  } 
    278280 
     281  CLEARLINE (LINES - 1); 
     282   
    279283  rc = mutt_bounce_message (NULL, h, adr); 
    280284  rfc822_free_address (&adr);