Changeset 5283:1770ab532bfd for imap

Show
Ignore:
Timestamp:
2007-11-06 09:23:06 (13 months ago)
Author:
Rocco Rutte <pdmef@…>
Branch:
HEAD
Message:

Add percentages to progress bar optionally supplied by caller.
This is necessary to let the mbox driver print useful percentages. If there's no
percentage given and we have a size, calculate on it on our own. Closes #2929.

Location:
imap
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • imap/imap.c

    r5240 r5283  
    231231     
    232232    if (pbar && !(pos % 1024)) 
    233       mutt_progress_update (pbar, pos); 
     233      mutt_progress_update (pbar, pos, -1); 
    234234#ifdef DEBUG 
    235235    if (debuglevel >= IMAP_LOG_LTRL) 
  • imap/message.c

    r5128 r5283  
    146146    for (msgno = msgbegin; msgno <= msgend ; msgno++) 
    147147    { 
    148       mutt_progress_update (&progress, msgno + 1); 
     148      mutt_progress_update (&progress, msgno + 1, -1); 
    149149   
    150150      memset (&h, 0, sizeof (h)); 
     
    224224  for (msgno = msgbegin; msgno <= msgend ; msgno++) 
    225225  { 
    226     mutt_progress_update (&progress, msgno + 1); 
     226    mutt_progress_update (&progress, msgno + 1, -1); 
    227227 
    228228    /* we may get notification of new mail while fetching headers */ 
     
    642642      sent += len; 
    643643      flush_buffer(buf, &len, idata->conn); 
    644       mutt_progress_update (&progressbar, sent); 
     644      mutt_progress_update (&progressbar, sent, -1); 
    645645    } 
    646646  }