From: Rocco Rutte Date: Mon, 25 May 2009 13:57:48 +0000 (+0200) Subject: pager: print progress percentage for attachments, too X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=855b742cb55f40f44545a3f4e7b06fa88f6666f3;p=neomutt pager: print progress percentage for attachments, too --- diff --git a/ChangeLog b/ChangeLog index df528363e..965da6385 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-05-25 15:25 +0200 Rocco Rutte (1b9ca049cbc1) + + * attach.c: Mark strings for translation + +2009-05-18 20:48 -0700 Vincent Lefevre (6d810c5cf4fc) + + * ChangeLog, po/fr.po: Updated French translation. + 2009-05-15 15:03 +0200 Takahashi Tamotsu (c665bdf5ff5f) * pop.c: POP: Notify user when messages are lost. Closes #2226. diff --git a/pager.c b/pager.c index 617d0fe7e..8443cd75d 100644 --- a/pager.c +++ b/pager.c @@ -1812,21 +1812,21 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra) SETCOLOR (MT_COLOR_STATUS); BKGDSET (MT_COLOR_STATUS); CLEARLINE (statusoffset); - if (IsHeader (extra)) + + if (IsHeader (extra) || IsMsgAttach (extra)) { size_t l1 = COLS * MB_LEN_MAX; size_t l2 = sizeof (buffer); - hfi.hdr = extra->hdr; + hfi.hdr = (IsHeader (extra)) ? extra->hdr : extra->bdy->hdr; mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT); + mutt_paddstr (COLS, buffer); } - else if (IsMsgAttach (extra)) + else { - size_t l1 = COLS * MB_LEN_MAX; - size_t l2 = sizeof (buffer); - hfi.hdr = extra->bdy->hdr; - mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT); + char bn[STRING]; + snprintf (bn, sizeof (bn), "%s (%s)", banner, pager_progress_str); + mutt_paddstr (COLS, bn); } - mutt_paddstr (COLS, IsHeader (extra) || IsMsgAttach (extra) ? buffer : banner); BKGDSET (MT_COLOR_NORMAL); SETCOLOR (MT_COLOR_NORMAL); }