From: nion Date: Thu, 8 Sep 2005 23:26:52 +0000 (+0000) Subject: Nico Golde: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=a0aa3d4bba449529dfed997214b34e309ce451dd Nico Golde: - fixed problem with mutt_progress_bar git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@495 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/imap/imap.c b/imap/imap.c index cc9f60c..4f0395f 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -211,8 +211,10 @@ int imap_read_literal (FILE * fp, IMAP_DATA * idata, long bytes, progress_t* bar r = 0; #endif fputc (c, fp); +#ifdef USE_SOCKET if (bar && pos % 1024) mutt_progress_bar (bar, pos); +#endif #ifdef DEBUG if (DebugLevel >= IMAP_LOG_LTRL) fputc (c, DebugFile); diff --git a/imap/message.c b/imap/message.c index 58fe61f..949ca2c 100644 --- a/imap/message.c +++ b/imap/message.c @@ -398,7 +398,9 @@ int imap_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) } bar.size = bytes; bar.msg = _("Fetching message..."); +#ifdef USE_SOCKET mutt_progress_bar (&bar, 0); +#endif if (imap_read_literal (msg->fp, idata, bytes, &bar) < 0) goto bail; /* pick up trailing line */ @@ -527,7 +529,9 @@ int imap_append_message (CONTEXT * ctx, MESSAGE * msg) bar.msg = _("Uploading message..."); bar.size = len; +#ifdef USE_SOCKET mutt_progress_bar (&bar, 0); +#endif imap_munge_mbox_name (mbox, sizeof (mbox), mailbox); snprintf (buf, sizeof (buf), "APPEND %s (%s%s%s%s%s) {%lu}", mbox, @@ -567,7 +571,9 @@ int imap_append_message (CONTEXT * ctx, MESSAGE * msg) if (len > sizeof (buf) - 3) { sent += len; flush_buffer (buf, &len, idata->conn); - mutt_progress_bar (&bar, sent); +#ifdef USE_SOCKET + mutt_progress_bar (&bar, sent); +#endif } }