From: pdmef Date: Wed, 14 Sep 2005 12:49:25 +0000 (+0000) Subject: Rocco Rutte: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=4711a1a970ba7dda6eaf71f16fdfd74f90d02bb8 Rocco Rutte: - merge in latest mutt changes git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@523 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/ChangeLog.mutt b/ChangeLog.mutt index c56e8b7..c548d37 100644 --- a/ChangeLog.mutt +++ b/ChangeLog.mutt @@ -1,3 +1,22 @@ +2005-09-14 02:45:44 Brendan Cully (brendan) + + * globals.h, init.h, sendlib.c: Add new $envelope_from_address + variable for manually specifying the envelope sender. Rename (with + compatibility synonym) $envelope_from to $use_envelope_from. Make + $envelope_from subordinate to $use_e_f, as $from is to $use_from. + +2005-09-13 20:36:17 Brendan Cully (brendan) + + * doc/Makefile.in: Put chunked HTML manual in top doc directory + instead of HTML subdirectory. Solves a weird $distdir + absolute/relative path nuisance. + +2005-09-12 06:22:21 Brendan Cully (brendan) + + * curs_lib.c, pop.c, pop.h, pop_lib.c: Teach pop driver about + mutt_progress_bar. Allow progress bar to omit total size if zero + (=unknown). + 2005-09-10 18:47:17 TAKAHASHI Tamotsu (brendan) * menu.c: Correct some inconsistencies introduced by diff --git a/UPGRADING b/UPGRADING index 650a06d..81ebdde 100644 --- a/UPGRADING +++ b/UPGRADING @@ -10,6 +10,13 @@ This document is not the place for verbose documentation; it only offers the necessary keywords to look them up in the manual, ChangeLog or other sources of information. +2005-09-14: + + The $smtp_envelope_from variable has been removed in favor of the + general $envelope_from_address. + + The $envelope_from option has been renamed to $use_envelope_from. + 2005-09-07: SASL 1.x support has been removed. diff --git a/VERSION.svn b/VERSION.svn index ec0e415..17c6383 100644 --- a/VERSION.svn +++ b/VERSION.svn @@ -1 +1 @@ -522 +523 diff --git a/curs_lib.c b/curs_lib.c index 46f6d30..e73d4f5 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -318,8 +318,9 @@ void mutt_progress_bar (progress_t* progress, long pos) { if (!NetInc) mutt_message (progress->msg); else { - mutt_pretty_size (progress->sizestr, sizeof (progress->sizestr), - progress->size); + if (progress->size) + mutt_pretty_size (progress->sizestr, sizeof (progress->sizestr), + progress->size); progress->pos = 0; } } @@ -331,7 +332,10 @@ void mutt_progress_bar (progress_t* progress, long pos) { progress->pos = pos; pos = pos / (NetInc << 10) * (NetInc << 10); mutt_pretty_size (posstr, sizeof (posstr), pos); - mutt_message ("%s %s/%s", progress->msg, posstr, progress->sizestr); + if (progress->size) + mutt_message ("%s %s/%s", progress->msg, posstr, progress->sizestr); + else + mutt_message ("%s %s", progress->msg, posstr); } } #endif diff --git a/globals.h b/globals.h index fa890ab..d918b03 100644 --- a/globals.h +++ b/globals.h @@ -29,6 +29,7 @@ WHERE char Quotebuf[SHORT_STRING]; WHERE char *MuttDotlock; #endif +WHERE ADDRESS *EnvFrom; WHERE ADDRESS *From; WHERE char *AliasFile; @@ -147,7 +148,6 @@ WHERE char *SimpleSearch; #if defined(USE_LIBESMTP) WHERE char *SmtpAuthUser; WHERE char *SmtpAuthPass; -WHERE char *SmtpEnvFrom; WHERE char *SmtpHost; WHERE unsigned short SmtpPort; WHERE char *SmtpUseTLS; diff --git a/init.h b/init.h index f42922b..3afe5f1 100644 --- a/init.h +++ b/init.h @@ -676,16 +676,24 @@ struct option_t MuttVars[] = { ** you must take care of space-stuffing mailbox; if (!smtp_set_reverse_path (message, envfrom)) SMTPFAIL ("smtp_set_reverse_path"); diff --git a/pop/pop.c b/pop/pop.c index f53f76a..804fec2 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -15,6 +15,7 @@ #include "mx.h" #include "pop.h" #include "mutt_crypt.h" +#include "mutt_curses.h" #include "lib/mem.h" #include "lib/str.h" @@ -326,7 +327,7 @@ int pop_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) 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]; @@ -364,7 +365,9 @@ int pop_fetch_message (MESSAGE * msg, CONTEXT * ctx, int 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+"); @@ -376,7 +379,7 @@ int pop_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) 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; diff --git a/pop/pop.h b/pop/pop.h index 38205bb..bbafe1f 100644 --- a/pop/pop.h +++ b/pop/pop.h @@ -12,6 +12,7 @@ #include "mx.h" #include "mutt_socket.h" +#include "mutt_curses.h" #define POP_PORT 110 #define POP_SSL_PORT 995 @@ -95,7 +96,7 @@ int pop_parse_path (const char *, ACCOUNT *); int pop_connect (POP_DATA *); pop_query_status pop_open_connection (POP_DATA *); pop_query_status pop_query_d (POP_DATA *, char *, size_t, char *); -pop_query_status pop_fetch_data (POP_DATA *, char *, char *, int (*funct) (char *, void *), +pop_query_status pop_fetch_data (POP_DATA *, char *, progress_t*, int (*funct) (char *, void *), void *); pop_query_status pop_reconnect (CONTEXT *); void pop_logout (CONTEXT *); diff --git a/pop/pop_lib.c b/pop/pop_lib.c index 22b2eaa..fe30c11 100644 --- a/pop/pop_lib.c +++ b/pop/pop_lib.c @@ -428,14 +428,15 @@ pop_query_status pop_query_d (POP_DATA * pop_data, char *buf, size_t buflen, cha * -2 - invalid command or execution error, * -3 - error in funct(*line, *data) */ -pop_query_status pop_fetch_data (POP_DATA * pop_data, char *query, char *msg, +pop_query_status pop_fetch_data (POP_DATA * pop_data, char *query, progress_t* bar, int (*funct) (char *, void *), void *data) { char buf[LONG_STRING]; char *inbuf; char *p; pop_query_status ret; - int chunk, line = 0; + int chunk = 0; + long pos = 0; size_t lenbuf = 0; strfcpy (buf, query, sizeof (buf)); @@ -463,14 +464,14 @@ pop_query_status pop_fetch_data (POP_DATA * pop_data, char *query, char *msg, } strfcpy (inbuf + lenbuf, p, sizeof (buf)); + pos += chunk; if (chunk >= sizeof (buf)) { lenbuf += strlen (p); } else { - line++; - if (msg && ReadInc && (line % ReadInc == 0)) - mutt_message ("%s %d", msg, line); + if (bar) + mutt_progress_bar (bar, pos); if (ret == 0 && funct (inbuf, data) < 0) ret = PFD_FUNCT_ERROR; lenbuf = 0; @@ -506,6 +507,7 @@ pop_query_status pop_reconnect (CONTEXT * ctx) { pop_query_status ret; POP_DATA *pop_data = (POP_DATA *) ctx->data; + progress_t bar; if (pop_data->status == POP_CONNECTED) return PQ_OK; @@ -517,15 +519,16 @@ pop_query_status pop_reconnect (CONTEXT * ctx) ret = pop_open_connection (pop_data); if (ret == PQ_OK) { - char *msg = _("Verifying message indexes..."); int i; + bar.msg = _("Verifying message indexes..."); + bar.size = 0; + mutt_progress_bar (&bar, 0); + for (i = 0; i < ctx->msgcount; i++) ctx->hdrs[i]->refno = -1; - mutt_message (msg); - - ret = pop_fetch_data (pop_data, "UIDL\r\n", msg, check_uidl, ctx); + ret = pop_fetch_data (pop_data, "UIDL\r\n", &bar, check_uidl, ctx); if (ret == PQ_ERR) { mutt_error ("%s", pop_data->err_msg); mutt_sleep (2); diff --git a/sendlib.c b/sendlib.c index 1e8ffe7..314c4a2 100644 --- a/sendlib.c +++ b/sendlib.c @@ -2025,9 +2025,16 @@ static int mutt_invoke_sendmail (ADDRESS * from, /* the sender */ if (eightbit && option (OPTUSE8BITMIME)) args = add_option (args, &argslen, &argsmax, "-B8BITMIME"); - if (option (OPTENVFROM) && from && !from->next) { - args = add_option (args, &argslen, &argsmax, "-f"); - args = add_args (args, &argslen, &argsmax, from); + if (option (OPTENVFROM)) { + ADDRESS *f = NULL; + if (EnvFrom) + f = EnvFrom; + else if (from && !from->next) + f = from; + if (f) { + args = add_option (args, &argslen, &argsmax, "-f"); + args = add_args (args, &argslen, &argsmax, f); + } } if (DsnNotify) { args = add_option (args, &argslen, &argsmax, "-N");