From: Pierre Habouzit Date: Thu, 24 May 2007 22:56:34 +0000 (+0200) Subject: more useless and cluttered things. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=f5a370338d87eba00bc8696636a90f6c50b05d14;p=apps%2Fmadmutt.git more useless and cluttered things. Signed-off-by: Pierre Habouzit --- diff --git a/globals.h b/globals.h index 2aea9ea..f2710a9 100644 --- a/globals.h +++ b/globals.h @@ -39,7 +39,6 @@ WHERE char *HdrFmt; WHERE char *ImapAuthenticators INITVAL (NULL); WHERE char *ImapDelimChars INITVAL (NULL); WHERE char *ImapHeaders; -WHERE char *ImapHomeNamespace INITVAL (NULL); WHERE char *ImapLogin INITVAL (NULL); WHERE char *ImapPass INITVAL (NULL); WHERE char *ImapUser INITVAL (NULL); diff --git a/handler.c b/handler.c index 30434af..0746269 100644 --- a/handler.c +++ b/handler.c @@ -1027,8 +1027,7 @@ static int multipart_handler (BODY * a, STATE * s) } rc = mutt_body_handler (p, s); state_putc ('\n', s); - if (rc || ((s->flags & M_REPLYING) - && (option (OPTINCLUDEONLYFIRST)) && (s->flags & M_FIRSTDONE))) + if (rc) break; } @@ -1438,7 +1437,6 @@ int mutt_body_handler (BODY * b, STATE * s) s->fpin = fp; } } - s->flags |= M_FIRSTDONE; } else if (s->flags & M_DISPLAY) { state_mark_attach (s); @@ -1455,7 +1453,6 @@ int mutt_body_handler (BODY * b, STATE * s) } bail: - s->flags = oflags | (s->flags & M_FIRSTDONE); - + s->flags = oflags; return (rc); } diff --git a/imap/browse.c b/imap/browse.c index a1c9a2d..3c741b1 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -71,7 +71,6 @@ int imap_browse (char *path, struct browser_state *state) if (!mx.mbox) { home_namespace = 1; mbox[0] = '\0'; /* Do not replace "" with "INBOX" here */ - mx.mbox = m_strdup(ImapHomeNamespace); if (mutt_bit_isset (idata->capabilities, NAMESPACE)) { mutt_message _("Getting namespaces..."); diff --git a/imap/message.c b/imap/message.c index 476f43a..62f4b21 100644 --- a/imap/message.c +++ b/imap/message.c @@ -384,7 +384,7 @@ int imap_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno) snprintf (buf, sizeof (buf), "UID FETCH %u %s", HEADER_DATA (h)->uid, (mutt_bit_isset (idata->capabilities, IMAP4REV1) ? - (option (OPTIMAPPEEK) ? "BODY.PEEK[]" : "BODY[]") : "RFC822")); + "BODY.PEEK[]" : "RFC822")); imap_cmd_start (idata, buf); do { diff --git a/init.h b/init.h index 648e0c5..89dcb12 100644 --- a/init.h +++ b/init.h @@ -622,14 +622,6 @@ struct option_t MuttVars[] = { ** .te */ #endif - {"hdrs", DT_BOOL, R_NONE, OPTHDRS, "yes" }, - /* - ** .pp - ** When \fIunset\fP, the header fields normally added by the ``$my_hdr'' - ** command are not created. This variable \fImust\fP be \fIunset\fP before - ** composing a new message or replying in order to take effect. If \fIset\fP, - ** the user defined header fields are added to every new message. - */ {"header", DT_BOOL, R_NONE, OPTHEADER, "no" }, /* ** .pp @@ -761,13 +753,6 @@ struct option_t MuttVars[] = { ** .pp ** \fBNote:\fP This is a space separated list. */ - {"imap_home_namespace", DT_STR, R_NONE, UL &ImapHomeNamespace, "" }, - /* - ** .pp - ** You normally want to see your personal folders alongside - ** your \fTINBOX\fP in the IMAP browser. If you see something else, you may set - ** this variable to the IMAP path to your folders. - */ {"imap_keepalive", DT_NUM, R_NONE, UL &ImapKeepalive, "900" }, /* ** .pp @@ -823,14 +808,6 @@ struct option_t MuttVars[] = { ** user/password pairs on Madmutt invocation, or if opening the connection ** is slow. */ - {"imap_peek", DT_BOOL, R_NONE, OPTIMAPPEEK, "yes" }, - /* - ** .pp - ** If \fIset\fP, Madmutt will avoid implicitly marking your mail as read whenever - ** you fetch a message from the server. This is generally a good thing, - ** but can make closing an IMAP folder somewhat slower. This option - ** exists to appease speed freaks. - */ {"imap_reconnect", DT_QUAD, R_NONE, OPT_IMAPRECONNECT, "ask-yes" }, /* ** .pp @@ -869,12 +846,6 @@ struct option_t MuttVars[] = { ** Controls whether or not a copy of the message(s) you are replying to ** is included in your reply. */ - {"include_onlyfirst", DT_BOOL, R_NONE, OPTINCLUDEONLYFIRST, "no" }, - /* - ** .pp - ** Controls whether or not Madmutt includes only the first attachment - ** of the message you are replying. - */ {"indent_string", DT_STR, R_NONE, UL &Prefix, "> "}, /* ** .pp @@ -1534,7 +1505,6 @@ struct option_t MuttVars[] = { ** checked with the check-traditional-pgp function, Madmutt will automatically ** check the message for traditional pgp. */ - /* XXX Default values! */ {"forward_decrypt", DT_BOOL, R_NONE, OPTFORWDECRYPT, "yes" }, /* ** .pp diff --git a/lib-ui/curs_main.c b/lib-ui/curs_main.c index dc19bf5..300dc8a 100644 --- a/lib-ui/curs_main.c +++ b/lib-ui/curs_main.c @@ -2042,35 +2042,20 @@ int mutt_index_menu (void) break; case OP_PIPE: - CHECK_MSGCOUNT; CHECK_VISIBLE; mutt_pipe_message (tag ? NULL : CURHDR); - /* in an IMAP folder index with imap_peek=no, piping could change - * * new or old messages status to read. Redraw what's needed. - */ - if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) { - menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; - } MAYBE_REDRAW (menu->redraw); break; case OP_PRINT: - CHECK_MSGCOUNT; CHECK_VISIBLE; mutt_print_message (tag ? NULL : CURHDR); - /* in an IMAP folder index with imap_peek=no, piping could change - * * new or old messages status to read. Redraw what's needed. - */ - if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) { - menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; - } break; case OP_MAIN_READ_THREAD: case OP_MAIN_READ_SUBTHREAD: - CHECK_MSGCOUNT; CHECK_VISIBLE; CHECK_READONLY; diff --git a/lib-ui/sidebar.c b/lib-ui/sidebar.c index 9f6e9ce..8065e55 100644 --- a/lib-ui/sidebar.c +++ b/lib-ui/sidebar.c @@ -186,7 +186,6 @@ static int make_sidebar_entry (char* sbox, int idx, ssize_t len) { int shortened = 0, lencnt = 0; char no[STRING], entry[STRING]; - int l = m_strlen(ImapHomeNamespace); int l_m = m_strlen(Maildir); if (SidebarWidth > COLS) @@ -202,10 +201,6 @@ static int make_sidebar_entry (char* sbox, int idx, ssize_t len) m_strformat(no, len, SidebarWidth, SidebarNumberFormat, sidebar_number_format, idx, 0); lencnt = m_strlen(no); - if (l > 0 && m_strncmp(sbox, ImapHomeNamespace, l) == 0 && - m_strlen(sbox) > l) - sbox += l + 1; /* we're trimming the ImapHomeNamespace, the "+ 1" is for the separator */ - else if (l_m > 0 && m_strncmp(sbox, Maildir, l_m) == 0 && m_strlen(sbox) > l_m) { sbox += l_m; diff --git a/mutt.h b/mutt.h index 9b1d54e..2bf0141 100644 --- a/mutt.h +++ b/mutt.h @@ -230,7 +230,6 @@ enum { #ifdef HAVE_QDBM OPTHCACHECOMPRESS, #endif - OPTHDRS, OPTHEADER, OPTHELP, OPTHIDDENHOST, @@ -243,10 +242,8 @@ enum { OPTIMAPCHECKSUBSCRIBED, OPTIMAPLSUB, OPTIMAPPASSIVE, - OPTIMAPPEEK, OPTIMAPSERVERNOISE, OPTIMPLICITAUTOVIEW, - OPTINCLUDEONLYFIRST, OPTKEEPFLAGGED, OPTMAILDIRTRASH, OPTMARKERS, diff --git a/send.c b/send.c index aa23162..ecc938f 100644 --- a/send.c +++ b/send.c @@ -1224,10 +1224,8 @@ int ci_send_message (int flags, /* send mode */ if (flags & SENDBATCH) { mutt_copy_stream (stdin, tempfp); - if (option (OPTHDRS)) { - process_user_recips (msg->env); - process_user_header (msg->env); - } + process_user_recips (msg->env); + process_user_header (msg->env); mutt_expand_aliases_env (msg->env); } else if (!(flags & (SENDPOSTPONED | SENDRESEND))) { @@ -1235,8 +1233,7 @@ int ci_send_message (int flags, /* send mode */ envelope_defaults (msg->env, ctx, cur, flags) == -1) goto cleanup; - if (option (OPTHDRS)) - process_user_recips (msg->env); + process_user_recips (msg->env); /* Expand aliases and remove duplicates/crossrefs */ mutt_fix_reply_recipients (msg->env); @@ -1292,8 +1289,7 @@ int ci_send_message (int flags, /* send mode */ killfrom = 0; } - if (option (OPTHDRS)) - process_user_header (msg->env); + process_user_header (msg->env); /* include replies/forwarded messages, unless we are given a template */ if (!tempfile && (ctx || !(flags & (SENDREPLY | SENDFORWARD))) diff --git a/state.h b/state.h index 2832af8..fb1c057 100644 --- a/state.h +++ b/state.h @@ -29,7 +29,6 @@ typedef struct { #define M_CHARCONV (1<<4) /* Do character set conversions */ #define M_PRINTING (1<<5) /* are we printing? - M_DISPLAY "light" */ #define M_REPLYING (1<<6) /* are we replying? */ -#define M_FIRSTDONE (1<<7) /* the first attachment has been done */ #define state_set_prefix(s) ((s)->flags |= M_PENDINGPREFIX) #define state_reset_prefix(s) ((s)->flags &= ~M_PENDINGPREFIX)