X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=init.h;h=903184719d3a6676695306d2f2f18458f6e3490e;hp=6f008bce9b4fe50fe073ea5e69ab1221ab318cb6;hb=00f34116b32751764d42f81159c292d850c74bac;hpb=da04d632587a221112a0f065e4802e1ea5393e21 diff --git a/init.h b/init.h index 6f008bc..9031847 100644 --- a/init.h +++ b/init.h @@ -39,23 +39,9 @@ #define M_SET_UNSET (1<<1) /* default is to unset all vars */ #define M_SET_RESET (1<<2) /* default is to reset all vars to default */ -/* forced redraw/resort types */ -#define R_NONE 0 -#define R_INDEX (1<<0) -#define R_PAGER (1<<1) -#define R_BOTH (R_INDEX|R_PAGER) - -/* TODO:MC: will go in the the thread module */ -#define R_RESORT (1<<2) /* resort the mailbox */ -#define R_RESORT_SUB (1<<3) /* resort subthreads */ -#define R_RESORT_INIT (1<<4) /* resort from scratch */ -#define R_TREE (1<<5) /* redraw the thread tree */ -#define R_RESORT_BOTH (R_RESORT|R_RESORT_SUB) - struct option_t { const char *option; short type; - short flags; unsigned long data; const char *init; }; @@ -68,7 +54,7 @@ struct option_t { struct option_t MuttVars[] = { /*++*/ - {"abort_noattach", DT_QUAD, R_NONE, OPT_ATTACH, "no" }, + {"abort_noattach", DT_QUAD, OPT_ATTACH, "no" }, /* ** .pp ** This variable specifies whether to abort sending if no attachment @@ -86,7 +72,7 @@ struct option_t MuttVars[] = { ** .pp ** See also the $$attach_remind_regexp variable. */ - {"abort_nosubject", DT_QUAD, R_NONE, OPT_SUBJECT, "ask-yes" }, + {"abort_nosubject", DT_QUAD, OPT_SUBJECT, "ask-yes" }, /* ** .pp ** If set to \fIyes\fP, when composing messages and no subject is given @@ -94,7 +80,7 @@ struct option_t MuttVars[] = { ** \fIno\fP, composing messages with no subject given at the subject ** prompt will never be aborted. */ - {"abort_unmodified", DT_QUAD, R_NONE, OPT_ABORT, "yes" }, + {"abort_unmodified", DT_QUAD, OPT_ABORT, "yes" }, /* ** .pp ** If set to \fIyes\fP, composition will automatically abort after @@ -102,42 +88,25 @@ struct option_t MuttVars[] = { ** check only happens after the \fIfirst\fP edit of the file). When set ** to \fIno\fP, composition will never be aborted. */ - {"allow_8bit", DT_BOOL, R_NONE, OPTALLOW8BIT, "yes" }, + {"allow_8bit", DT_BOOL, OPTALLOW8BIT, "yes" }, /* ** .pp ** Controls whether 8-bit data is converted to 7-bit using either ** \fTquoted-printable\fP or \fTbase64\fP encoding when sending mail. */ - {"allow_ansi", DT_BOOL, R_NONE, OPTALLOWANSI, "no" }, - /* - ** .pp - ** Controls whether ANSI color codes in messages (and color tags in - ** rich text messages) are to be interpreted. - ** Messages containing these codes are rare, but if this option is set, - ** their text will be colored accordingly. Note that this may override - ** your color choices, and even present a security problem, since a - ** message could include a line like ``\fT[-- PGP output follows ...\fP" and - ** give it the same color as your attachment color. - */ - {"ascii_chars", DT_BOOL, R_BOTH, OPTASCIICHARS, "no" }, - /* - ** .pp - ** If \fIset\fP, Madmutt will use plain ASCII characters when displaying thread - ** and attachment trees, instead of the default \fTACS\fP characters. - */ - {"askbcc", DT_BOOL, R_NONE, OPTASKBCC, "no" }, + {"askbcc", DT_BOOL, OPTASKBCC, "no" }, /* ** .pp ** If \fIset\fP, Madmutt will prompt you for blind-carbon-copy (Bcc) recipients ** before editing an outgoing message. */ - {"askcc", DT_BOOL, R_NONE, OPTASKCC, "no" }, + {"askcc", DT_BOOL, OPTASKCC, "no" }, /* ** .pp ** If \fIset\fP, Madmutt will prompt you for carbon-copy (Cc) recipients before ** editing the body of an outgoing message. */ - {"attach_format", DT_STR, R_NONE, UL &AttachFormat, "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] "}, + {"attach_format", DT_STR, UL &AttachFormat, "%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] "}, /* ** .pp ** This variable describes the format of the ``attachment'' menu. The @@ -164,7 +133,7 @@ struct option_t MuttVars[] = { ** .dt %|X .dd pad to the end of the line with character "X" ** .de */ - {"attach_remind_regexp", DT_RX, R_NONE, UL &AttachRemindRegexp, "attach"}, + {"attach_remind_regexp", DT_RX, UL &AttachRemindRegexp, "attach"}, /* ** .pp ** If this variable is non-empty, madmutt will scan a message's contents @@ -174,13 +143,13 @@ struct option_t MuttVars[] = { ** This variable and $$abort_noattach are intended to remind the user ** to attach files if the message's text references them. */ - {"attach_sep", DT_STR, R_NONE, UL &AttachSep, "\n"}, + {"attach_sep", DT_STR, UL &AttachSep, "\n"}, /* ** .pp ** The separator to add between attachments when operating (saving, ** printing, piping, etc) on a list of tagged attachments. */ - {"attach_split", DT_BOOL, R_NONE, OPTATTACHSPLIT, "yes" }, + {"attach_split", DT_BOOL, OPTATTACHSPLIT, "yes" }, /* ** .pp ** If this variable is \fIunset\fP, when operating (saving, printing, piping, @@ -189,14 +158,14 @@ struct option_t MuttVars[] = { ** ``$$attach_sep'' separator is added after each attachment. When \fIset\fP, ** Madmutt will operate on the attachments one by one. */ - {"attribution", DT_STR, R_NONE, UL &Attribution, "On %d, %n wrote:"}, + {"attribution", DT_STR, UL &Attribution, "On %d, %n wrote:"}, /* ** .pp ** This is the string that will precede a message which has been included ** in a reply. For a full listing of defined \fTprintf(3)\fP-like sequences see ** the section on ``$$index_format''. */ - {"autoedit", DT_BOOL, R_NONE, OPTAUTOEDIT, "no" }, + {"autoedit", DT_BOOL, OPTAUTOEDIT, "no" }, /* ** .pp ** When \fIset\fP along with ``$$edit_headers'', Madmutt will skip the initial @@ -206,7 +175,7 @@ struct option_t MuttVars[] = { ** .pp ** Also see ``$$fast_reply''. */ - {"auto_tag", DT_BOOL, R_NONE, OPTAUTOTAG, "no" }, + {"auto_tag", DT_BOOL, OPTAUTOTAG, "no" }, /* ** .pp ** When \fIset\fP, functions in the \fIindex\fP menu which affect a message @@ -214,7 +183,7 @@ struct option_t MuttVars[] = { ** unset, you must first use the ``tag-prefix'' function (default: "\fT;\fP") to ** make the next function apply to all tagged messages. */ - {"bounce", DT_QUAD, R_NONE, OPT_BOUNCE, "ask-yes" }, + {"bounce", DT_QUAD, OPT_BOUNCE, "ask-yes" }, /* ** .pp ** Controls whether you will be asked to confirm bouncing messages. @@ -222,23 +191,14 @@ struct option_t MuttVars[] = { ** message. Setting this variable to \fIno\fP is not generally useful, ** and thus not recommended, because you are unable to bounce messages. */ - {"bounce_delivered", DT_BOOL, R_NONE, OPTBOUNCEDELIVERED, "yes" }, + {"bounce_delivered", DT_BOOL, OPTBOUNCEDELIVERED, "yes" }, /* ** .pp ** When this variable is \fIset\fP, Madmutt will include ** \fTDelivered-To:\fP header fields when bouncing messages. ** Postfix users may wish to \fIunset\fP this variable. */ - { "braille_friendly", DT_BOOL, R_NONE, OPTBRAILLEFRIENDLY, "no" }, - /* - ** .pp - ** When this variable is set, mutt will place the cursor at the beginning - ** of the current line in menus, even when the arrow_cursor variable - ** is unset, making it easier for blind persons using Braille displays to - ** follow these menus. The option is disabled by default because many - ** visual terminals don't permit making the cursor invisible. - */ - {"check_new", DT_BOOL, R_NONE, OPTCHECKNEW, "yes" }, + {"check_new", DT_BOOL, OPTCHECKNEW, "yes" }, /* ** .pp ** \fBNote:\fP this option only affects \fImaildir\fP and \fIMH\fP style @@ -250,19 +210,19 @@ struct option_t MuttVars[] = { ** checking each file to see if it has already been looked at. If it's ** \fIunset\fP, no check for new mail is performed while the mailbox is open. */ - {"collapse_unread", DT_BOOL, R_NONE, OPTCOLLAPSEUNREAD, "yes" }, + {"collapse_unread", DT_BOOL, OPTCOLLAPSEUNREAD, "yes" }, /* ** .pp ** When \fIunset\fP, Madmutt will not collapse a thread if it contains any ** unread messages. */ - {"uncollapse_jump", DT_BOOL, R_NONE, OPTUNCOLLAPSEJUMP, "no" }, + {"uncollapse_jump", DT_BOOL, OPTUNCOLLAPSEJUMP, "no" }, /* ** .pp ** When \fIset\fP, Madmutt will jump to the next unread message, if any, ** when the current thread is \fIun\fPcollapsed. */ - {"compose_format", DT_STR, R_BOTH, UL &ComposeFormat, "-- Madmutt: Compose [Approx. msg size: %l Atts: %a]%>-"}, + {"compose_format", DT_STR, UL &ComposeFormat, "-- Madmutt: Compose [Approx. msg size: %l Atts: %a]%>-"}, /* ** .pp ** Controls the format of the status line displayed in the ``compose'' @@ -279,45 +239,45 @@ struct option_t MuttVars[] = { ** See the text describing the ``$$status_format'' option for more ** information on how to set ``$$compose_format''. */ - {"config_charset", DT_STR, R_NONE, UL &ConfigCharset, "" }, + {"config_charset", DT_STR, UL &ConfigCharset, "" }, /* ** .pp ** When defined, Madmutt will recode commands in rc files from this ** encoding. */ - {"confirmappend", DT_BOOL, R_NONE, OPTCONFIRMAPPEND, "yes" }, + {"confirmappend", DT_BOOL, OPTCONFIRMAPPEND, "yes" }, /* ** .pp ** When \fIset\fP, Madmutt will prompt for confirmation when appending messages to ** an existing mailbox. */ - {"confirmcreate", DT_BOOL, R_NONE, OPTCONFIRMCREATE, "yes" }, + {"confirmcreate", DT_BOOL, OPTCONFIRMCREATE, "yes" }, /* ** .pp ** When \fIset\fP, Madmutt will prompt for confirmation when saving messages to a ** mailbox which does not yet exist before creating it. */ - {"connect_timeout", DT_NUM, R_NONE, UL &ConnectTimeout, "30" }, + {"connect_timeout", DT_NUM, UL &ConnectTimeout, "30" }, /* ** .pp ** Causes Madmutt to timeout a network connection (for IMAP or POP) after this ** many seconds if the connection is not able to be established. A negative ** value causes Madmutt to wait indefinitely for the connection to succeed. */ - {"content_type", DT_STR, R_NONE, UL &ContentType, "text/plain"}, + {"content_type", DT_STR, UL &ContentType, "text/plain"}, /* ** .pp ** Sets the default \fTContent-Type:\fP header field for the body ** of newly composed messages. */ - {"copy", DT_QUAD, R_NONE, OPT_COPY, "yes" }, + {"copy", DT_QUAD, OPT_COPY, "yes" }, /* ** .pp ** This variable controls whether or not copies of your outgoing messages ** will be saved for later references. Also see ``$$record'', ** and ``$fcc-hook''. */ - {"date_format", DT_STR, R_BOTH, UL &DateFmt, "!%a, %b %d, %Y at %I:%M:%S%p %Z"}, + {"date_format", DT_STR, UL &DateFmt, "!%a, %b %d, %Y at %I:%M:%S%p %Z"}, /* ** .pp ** This variable controls the format of the date printed by the ``\fT%d\fP'' @@ -331,7 +291,7 @@ struct option_t MuttVars[] = { ** rest of the string are expanded in the \fIC\fP locale (that is in US ** English). */ - {"default_hook", DT_STR, R_NONE, UL &DefaultHook, "~f %s !~P | (~P ~C %s)"}, + {"default_hook", DT_STR, UL &DefaultHook, "~f %s !~P | (~P ~C %s)"}, /* ** .pp ** This variable controls how send-hooks, message-hooks, save-hooks, @@ -345,7 +305,7 @@ struct option_t MuttVars[] = { ** ``alternates'') and is to or cc'ed to a user matching the given ** regular expression. */ - {"delete", DT_QUAD, R_NONE, OPT_DELETE, "ask-yes" }, + {"delete", DT_QUAD, OPT_DELETE, "ask-yes" }, /* ** .pp ** Controls whether or not messages are really deleted when closing or @@ -353,7 +313,7 @@ struct option_t MuttVars[] = { ** deleting will automatically be purged without prompting. If set to ** \fIno\fP, messages marked for deletion will be kept in the mailbox. */ - {"delete_space", DT_BOOL, R_NONE, OPTDELSP, "no" }, + {"delete_space", DT_BOOL, OPTDELSP, "no" }, /* ** .pp ** When sending messages with \fTformat=flowed\fP by \fIsetting\fP the @@ -366,27 +326,27 @@ struct option_t MuttVars[] = { ** \fBNote:\fP this variable only has an effect on \fIoutgoing\fP messages ** (if $$text_flowed is \fIset\fP) but not on incomming. */ - {"delete_untag", DT_BOOL, R_NONE, OPTDELETEUNTAG, "yes" }, + {"delete_untag", DT_BOOL, OPTDELETEUNTAG, "yes" }, /* ** .pp ** If this option is \fIset\fP, Madmutt will untag messages when marking them ** for deletion. This applies when you either explicitly delete a message, ** or when you save it to another folder. */ - {"digest_collapse", DT_BOOL, R_NONE, OPTDIGESTCOLLAPSE, "yes" }, + {"digest_collapse", DT_BOOL, OPTDIGESTCOLLAPSE, "yes" }, /* ** .pp ** If this option is \fIset\fP, Madmutt's received-attachments menu will not show the subparts of ** individual messages in a multipart/digest. To see these subparts, press 'v' on that menu. */ - {"display_filter", DT_PATH, R_PAGER, UL &DisplayFilter, ""}, + {"display_filter", DT_PATH, UL &DisplayFilter, ""}, /* ** .pp ** When \fIset\fP, specifies a command used to filter messages. When a message ** is viewed it is passed as standard input to $$display_filter, and the ** filtered message is read from the standard output. */ - {"duplicate_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTDUPTHREADS, "yes" }, + {"duplicate_threads", DT_BOOL, OPTDUPTHREADS, "yes" }, /* ** .pp ** This variable controls whether Madmutt, when sorting by threads, threads @@ -394,7 +354,7 @@ struct option_t MuttVars[] = { ** If it is \fIset\fP, it will indicate that it thinks they are duplicates ** of each other with an equals sign in the thread diagram. */ - {"edit_headers", DT_BOOL, R_NONE, OPTEDITHDRS, "no" }, + {"edit_headers", DT_BOOL, OPTEDITHDRS, "no" }, /* ** .pp ** This option allows you to edit the header of your outgoing messages @@ -404,11 +364,7 @@ struct option_t MuttVars[] = { ** Which empty header fields to show is controlled by the ** $$editor_headers option. */ -#ifdef USE_NNTP - {"editor_headers", DT_STR, R_NONE, UL &EditorHeaders, "From: To: Cc: Bcc: Subject: Reply-To: Newsgroups: Followup-To: X-Comment-To:" }, -#else - {"editor_headers", DT_STR, R_NONE, UL &EditorHeaders, "From: To: Cc: Bcc: Subject: Reply-To:" }, -#endif + {"editor_headers", DT_STR, UL &EditorHeaders, "From: To: Cc: Bcc: Subject: Reply-To:" }, /* ** .pp ** If $$edit_headers is \fIset\fP, this space-separated list specifies @@ -419,7 +375,7 @@ struct option_t MuttVars[] = { ** Note: if $$edit_headers had to be turned on by force because ** $$strict_mailto is \fIunset\fP, this option has no effect. */ - {"encode_from", DT_BOOL, R_NONE, OPTENCODEFROM, "no" }, + {"encode_from", DT_BOOL, OPTENCODEFROM, "no" }, /* ** .pp ** When \fIset\fP, Madmutt will \fTquoted-printable\fP encode messages when @@ -434,7 +390,7 @@ struct option_t MuttVars[] = { ** you must take care of space-stuffing