#include "mx.h"
#include "pop.h"
#include "mutt_crypt.h"
+#include "mutt_curses.h"
#include "lib/mem.h"
#include "lib/str.h"
void *uidl;
char buf[LONG_STRING];
char path[_POSIX_PATH_MAX];
- char *m = _("Fetching message...");
+ progress_t bar;
POP_DATA *pop_data = (POP_DATA *) ctx->data;
POP_CACHE *cache;
HEADER *h = ctx->hdrs[msgno];
return -1;
}
- mutt_message (m);
+ bar.size = h->content->length + h->content->offset - 1;
+ bar.msg = _("Fetching message...");
+ mutt_progress_bar (&bar, 0);
mutt_mktemp (path);
msg->fp = safe_fopen (path, "w+");
snprintf (buf, sizeof (buf), "RETR %d\r\n", h->refno);
- ret = pop_fetch_data (pop_data, buf, m, fetch_message, msg->fp);
+ ret = pop_fetch_data (pop_data, buf, &bar, fetch_message, msg->fp);
if (ret == PQ_OK)
break;