Discussion:
[PATCH] Indexcolor
Elimar Riesebieter
2006-10-28 17:59:29 UTC
Permalink
This patch has to be noted as the last one in the series file.


Main indexcolor page: http://greek0.net/mutt.html
Patch forward ported to 1.5.11 by Christoph 'Myon' Berg (http://www.df7cb.de/)
Myons patch reworked for mutt-ng by Elimar Riesebieter <***@lxtec.de>

diff -ur mutt~/color.c mutt/color.c
--- mutt~/color.c 2006-10-28 19:17:57.000000000 +0200
+++ mutt/color.c 2006-10-28 19:21:09.000000000 +0200
@@ -35,6 +35,8 @@
COLOR_LINE *ColorHdrList = NULL;
COLOR_LINE *ColorBodyList = NULL;
COLOR_LINE *ColorIndexList = NULL;
+COLOR_LINE *ColorIndexSubjectList = NULL;
+COLOR_LINE *ColorIndexAuthorList = NULL;

/* local to this file */
static int ColorQuoteSize;
@@ -93,6 +95,14 @@
{ "bold", MT_COLOR_BOLD },
{ "underline", MT_COLOR_UNDERLINE },
{ "index", MT_COLOR_INDEX },
+ { "index_subject", MT_COLOR_INDEX_SUBJECT },
+ { "index_author", MT_COLOR_INDEX_AUTHOR },
+ { "index_collapsed", MT_COLOR_INDEX_COLLAPSED },
+ { "index_date", MT_COLOR_INDEX_DATE },
+ { "index_flags", MT_COLOR_INDEX_FLAGS },
+ { "index_label", MT_COLOR_INDEX_LABEL },
+ { "index_number", MT_COLOR_INDEX_NUMBER },
+ { "index_size", MT_COLOR_INDEX_SIZE },
{ "sidebar_new", MT_COLOR_NEW },
{ "sidebar", MT_COLOR_SIDEBAR },
{ NULL, 0 }
@@ -367,12 +377,55 @@
return _mutt_parse_uncolor(buf, s, data, err, 0);
}

+static void
+mutt_do_uncolor (BUFFER *buf, BUFFER *s, COLOR_LINE **ColorList,
+ int *do_cache, int parse_uncolor)
+{
+ COLOR_LINE *tmp, *last = NULL;
+
+ do
+ {
+ mutt_extract_token (buf, s, 0);
+ if (!mutt_strcmp ("*", buf->data))
+ {
+ for (tmp = *ColorList; tmp; )
+ {
+ if (!*do_cache)
+ *do_cache = 1;
+ last = tmp;
+ tmp = tmp->next;
+ mutt_free_color_line(&last, parse_uncolor);
+ }
+ *ColorList = NULL;
+ }
+ else
+ {
+ for (last = NULL, tmp = *ColorList; tmp; last = tmp, tmp = tmp->next)
+ {
+ if (!mutt_strcmp (buf->data, tmp->pattern))
+ {
+ if (!*do_cache)
+ *do_cache = 1;
+ dprint(1,(debugfile,"Freeing pattern \"%s\" from ColorList\n",
+ tmp->pattern));
+ if (last)
+ last->next = tmp->next;
+ else
+ *ColorList = tmp->next;
+ mutt_free_color_line(&tmp, parse_uncolor);
+ break;
+ }
+ }
+ }
+ }
+ while (MoreArgs (s));
+}
+
static int
_mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err,
short parse_uncolor)
{
int object = 0, do_cache = 0;
- COLOR_LINE *tmp, *last = NULL;

mutt_extract_token (buf, s, 0);

@@ -382,6 +435,13 @@
return (-1);
}

+ if (object > MT_COLOR_INDEX_AUTHOR) /* uncolor index column */
+ {
+ ColorDefs[object] = 0;
+ set_option (OPTFORCEREDRAWINDEX);
+ return (0);
+ }
+
if (mutt_strncmp (buf->data, "index", 5) != 0)
{
snprintf (err->data, err->dsize,
@@ -419,44 +479,12 @@
return 0;
}

-
- do
- {
- mutt_extract_token (buf, s, 0);
- if (!mutt_strcmp ("*", buf->data))
- {
- for (tmp = ColorIndexList; tmp; )
- {
- if (!do_cache)
- do_cache = 1;
- last = tmp;
- tmp = tmp->next;
- mutt_free_color_line(&last, parse_uncolor);
- }
- ColorIndexList = NULL;
- }
- else
- {
- for (last = NULL, tmp = ColorIndexList; tmp; last = tmp, tmp = tmp->next)
- {
- if (!mutt_strcmp (buf->data, tmp->pattern))
- {
- if (!do_cache)
- do_cache = 1;
- dprint(1,(debugfile,"Freeing pattern \"%s\" from ColorIndexList\n",
- tmp->pattern));
- if (last)
- last->next = tmp->next;
- else
- ColorIndexList = tmp->next;
- mutt_free_color_line(&tmp, parse_uncolor);
- break;
- }
- }
- }
- }
- while (MoreArgs (s));
-
+ if (object == MT_COLOR_INDEX)
+ mutt_do_uncolor(buf, s, &ColorIndexList, &do_cache, parse_uncolor);
+ if (object == MT_COLOR_INDEX_SUBJECT)
+ mutt_do_uncolor(buf, s, &ColorIndexSubjectList, &do_cache, parse_uncolor);
+ if (object == MT_COLOR_INDEX_AUTHOR)
+ mutt_do_uncolor(buf, s, &ColorIndexAuthorList, &do_cache, parse_uncolor);

if (do_cache && !option (OPTNOCURSES))
{
@@ -696,7 +724,7 @@

/* extract a regular expression if needed */

- if (object == MT_COLOR_HEADER || object == MT_COLOR_BODY || object == MT_COLOR_INDEX)
+ if (object == MT_COLOR_HEADER || object == MT_COLOR_BODY || object == MT_COLOR_INDEX || object == MT_COLOR_INDEX_SUBJECT || object == MT_COLOR_INDEX_AUTHOR)
{
if (!MoreArgs (s))
{
@@ -740,6 +768,18 @@
r = add_pattern (&ColorIndexList, buf->data, 1, fg, bg, attr, err, 1);
set_option (OPTFORCEREDRAWINDEX);
}
+ else if (object == MT_COLOR_INDEX_SUBJECT)
+ {
+ r = add_pattern (&ColorIndexSubjectList, buf->data,
+ 1, fg, bg, attr, err, 1);
+ set_option (OPTFORCEREDRAWINDEX);
+ }
+ else if (object == MT_COLOR_INDEX_AUTHOR)
+ {
+ r = add_pattern (&ColorIndexAuthorList, buf->data,
+ 1, fg, bg, attr, err, 1);
+ set_option (OPTFORCEREDRAWINDEX);
+ }
else if (object == MT_COLOR_QUOTED)
{
if (q_level >= ColorQuoteSize)
@@ -765,7 +805,11 @@
ColorQuote[q_level] = fgbgattr_to_color(fg, bg, attr);
}
else
+ {
ColorDefs[object] = fgbgattr_to_color(fg, bg, attr);
+ if (object > MT_COLOR_INDEX_AUTHOR)
+ set_option (OPTFORCEREDRAWINDEX);
+ }

#ifdef HAVE_COLOR
# ifdef HAVE_BKGDSET
diff -ur mutt~/curs_lib.c mutt/curs_lib.c
--- mutt~/curs_lib.c 2006-10-28 19:17:57.000000000 +0200
+++ mutt/curs_lib.c 2006-10-28 19:20:15.000000000 +0200
@@ -614,6 +614,7 @@
size_t k, k2;
char scratch[MB_LEN_MAX];
mbstate_t mbstate1, mbstate2;
+ int escaped = 0;

memset(&mbstate1, 0, sizeof (mbstate1));
memset(&mbstate2, 0, sizeof (mbstate2));
@@ -626,7 +627,15 @@
k = (k == (size_t)(-1)) ? 1 : n;
wc = replacement_char ();
}
- if (arboreal && wc < M_TREE_MAX)
+ if (escaped) {
+ escaped = 0;
+ w = 0;
+ }
+ else if (arboreal && wc == M_SPECIAL_INDEX) {
+ escaped = 1;
+ w = 0;
+ }
+ else if (arboreal && wc < M_TREE_MAX)
w = 1; /* hack */
else
{
diff -ur mutt~/doc/manual.xml.head mutt/doc/manual.xml.head
--- mutt~/doc/manual.xml.head 2006-10-28 19:17:57.000000000 +0200
+++ mutt/doc/manual.xml.head 2006-10-28 19:20:15.000000000 +0200
@@ -1853,8 +1853,8 @@
<para>
<literallayout>
Usage: <literal>color</literal> <emphasis>object</emphasis> <emphasis>foreground</emphasis> <emphasis>background</emphasis> &lsqb; <emphasis>regexp</emphasis> &rsqb;
-Usage: <literal>color</literal> index <emphasis>foreground</emphasis> <emphasis>background</emphasis> <emphasis>pattern</emphasis>
-Usage: <literal>uncolor</literal> index <emphasis>pattern</emphasis> &lsqb; <emphasis>pattern</emphasis> ... &rsqb;
+Usage: <literal>color</literal> <emphasis>index-object</emphasis> <emphasis>foreground</emphasis> <emphasis>background</emphasis> <emphasis>pattern</emphasis>
+ Usage: <literal>uncolor</literal> <emphasis>index-object</emphasis> <emphasis>pattern</emphasis> &lsqb; <emphasis>pattern</emphasis> ... &rsqb;
</literallayout>
</para>

@@ -1917,6 +1917,54 @@
<listitem>

<para>
+index_author (color of the author name in the index, uses <emphasis>pattern</emphasis>)
+</para>
+</listitem>
+<listitem>
+
+<para>
+index_collapsed (the number of messages in a collapsed thread in the index)
+</para>
+</listitem>
+<listitem>
+
+<para>
+index_date (color of the date field in the index)
+</para>
+</listitem>
+<listitem>
+
+<para>
+index_flags (color of the message flags in the index)
+</para>
+</listitem>
+<listitem>
+
+<para>
+index_label (color of the message label in the index)
+</para>
+</listitem>
+<listitem>
+
+<para>
+index_number (color of the message number in the index)
+</para>
+</listitem>
+<listitem>
+
+<para>
+index_size (color of the message size and line number in the index)
+</para>
+</listitem>
+<listitem>
+
+<para>
+index_subject (color of the subject in the index, uses <emphasis>pattern</emphasis>)
+</para>
+</listitem>
+<listitem>
+
+<para>
indicator (arrow or bar used to indicate the current item in a menu)
</para>
</listitem>
diff -ur mutt~/hdrline.c mutt/hdrline.c
--- mutt~/hdrline.c 2006-10-28 19:17:57.000000000 +0200
+++ mutt/hdrline.c 2006-10-28 19:20:15.000000000 +0200
@@ -99,6 +99,34 @@
return 0;
}

+/* Takes the color to embed, the buffer to manipulate and the buffer length as
+ * arguments.
+ * Returns the number of chars written. */
+static size_t add_index_color(char *buf, size_t buflen,
+ format_flag flags, char color)
+{
+ int len;
+
+ /* only add color markers if we are operating on main index entries. */
+ if (!(flags & M_FORMAT_INDEX))
+ return 0;
+
+ if (color == MT_COLOR_INDEX) { /* buf might be uninitialized other cases */
+ len = mutt_strlen(buf);
+ buf += len;
+ buflen -= len;
+ }
+
+ if (buflen < 2)
+ return 0;
+
+ buf[0] = M_SPECIAL_INDEX;
+ buf[1] = color;
+ buf[2] = '\0';
+
+ return 2;
+}
+
static void make_from (ENVELOPE *hdr, char *buf, size_t len, int do_lists)
{
int me;
@@ -253,6 +281,7 @@
#define THREAD_NEW (threads && hdr->collapsed && hdr->num_hidden > 1 && mutt_thread_contains_unread (ctx, hdr) == 1)
#define THREAD_OLD (threads && hdr->collapsed && hdr->num_hidden > 1 && mutt_thread_contains_unread (ctx, hdr) == 2)
size_t len;
+ size_t colorlen;

hdr = hfi->hdr;
ctx = hfi->ctx;
@@ -304,12 +333,17 @@
break;

case 'c':
+ colorlen = add_index_color(dest, destlen, flags, MT_COLOR_INDEX_SIZE);
mutt_pretty_size (buf2, sizeof (buf2), (long) hdr->content->length);
- mutt_format_s (dest, destlen, prefix, buf2);
+ mutt_format_s (dest+colorlen, destlen-colorlen, prefix, buf2);
+ add_index_color(dest+colorlen, destlen-colorlen, flags, MT_COLOR_INDEX);
break;

case 'C':
- snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
+ colorlen = add_index_color(fmt, sizeof(fmt), flags, MT_COLOR_INDEX_NUMBER);
+ snprintf (fmt+colorlen, sizeof(fmt)-colorlen, "%%%sd", prefix);
+ add_index_color(fmt+colorlen, sizeof(fmt)-colorlen, flags, MT_COLOR_INDEX);
+
snprintf (dest, destlen, fmt, hdr->msgno + 1);
break;

@@ -408,7 +442,10 @@
if (do_locales)
setlocale (LC_TIME, "C");

- mutt_format_s (dest, destlen, prefix, buf2);
+ colorlen = add_index_color(dest, destlen, flags, MT_COLOR_INDEX_DATE);
+ mutt_format_s (dest+colorlen, destlen-colorlen, prefix, buf2);
+ add_index_color(dest+colorlen, destlen-colorlen, flags, MT_COLOR_INDEX);
+
if (len > 0 && op != 'd' && op != 'D') /* Skip ending op */
src = cp + 1;
}
@@ -438,8 +475,10 @@
case 'F':
if (!optional)
{
+ colorlen = add_index_color(dest, destlen, flags, MT_COLOR_INDEX_AUTHOR);
make_from (hdr->env, buf2, sizeof (buf2), 0);
- mutt_format_s (dest, destlen, prefix, buf2);
+ mutt_format_s (dest+colorlen, destlen-colorlen, prefix, buf2);
+ add_index_color(dest+colorlen, destlen-colorlen, flags, MT_COLOR_INDEX);
}
else if (mutt_addr_is_user (hdr->env->from))
optional = 0;
@@ -471,7 +510,9 @@
if (!optional)
{
snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
- snprintf (dest, destlen, fmt, (int) hdr->lines);
+ colorlen = add_index_color(dest, destlen, flags, MT_COLOR_INDEX_SIZE);
+ snprintf (dest+colorlen, destlen-colorlen, fmt, (int) hdr->lines);
+ add_index_color(dest+colorlen, destlen-colorlen, flags, MT_COLOR_INDEX);
}
else if (hdr->lines <= 0)
optional = 0;
@@ -480,8 +521,10 @@
case 'L':
if (!optional)
{
+ colorlen = add_index_color(dest, destlen, flags, MT_COLOR_INDEX_AUTHOR);
make_from (hdr->env, buf2, sizeof (buf2), 1);
- mutt_format_s (dest, destlen, prefix, buf2);
+ mutt_format_s (dest+colorlen, destlen-colorlen, prefix, buf2);
+ add_index_color(dest+colorlen, destlen-colorlen, flags, MT_COLOR_INDEX);
}
else if (!check_for_mailing_list (hdr->env->to, NULL, NULL, 0) &&
!check_for_mailing_list (hdr->env->cc, NULL, NULL, 0))
@@ -536,10 +579,16 @@
snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
if (!optional)
{
- if (threads && is_index && hdr->collapsed && hdr->num_hidden > 1)
- snprintf (dest, destlen, fmt, hdr->num_hidden);
- else if (is_index && threads)
- mutt_format_s (dest, destlen, prefix, " ");
+ colorlen = add_index_color(dest, destlen, flags,
+ MT_COLOR_INDEX_COLLAPSED);
+ if (threads && is_index && hdr->collapsed && hdr->num_hidden > 1) {
+ snprintf (dest+colorlen, destlen-colorlen, fmt, hdr->num_hidden);
+ add_index_color(dest, destlen-colorlen, flags, MT_COLOR_INDEX);
+ }
+ else if (is_index && threads) {
+ mutt_format_s (dest+colorlen, destlen-colorlen, prefix, " ");
+ add_index_color(dest, destlen-colorlen, flags, MT_COLOR_INDEX);
+ }
else
*dest = '\0';
}
@@ -556,15 +605,23 @@
{
if (flags & M_FORMAT_FORCESUBJ)
{
- mutt_format_s (dest, destlen, "", NONULL (hdr->env->subject));
+ colorlen = add_index_color(dest, destlen, flags, MT_COLOR_INDEX_SUBJECT);
+ mutt_format_s (dest+colorlen, destlen-colorlen, "",
+ NONULL (hdr->env->subject));
+ add_index_color(dest+colorlen, destlen-colorlen, flags, MT_COLOR_INDEX);
+
snprintf (buf2, sizeof (buf2), "%s%s", hdr->tree, dest);
mutt_format_s_tree (dest, destlen, prefix, buf2);
}
else
mutt_format_s_tree (dest, destlen, prefix, hdr->tree);
}
- else
- mutt_format_s (dest, destlen, prefix, NONULL (hdr->env->subject));
+ else {
+ colorlen = add_index_color(dest, destlen, flags, MT_COLOR_INDEX_SUBJECT);
+ mutt_format_s (dest+colorlen, destlen-colorlen, prefix,
+ NONULL (hdr->env->subject));
+ add_index_color(dest+colorlen, destlen-colorlen, flags, MT_COLOR_INDEX);
+ }
break;

case 'S':
@@ -667,7 +724,9 @@
hdr->tagged ? '*' :
(hdr->flagged ? '!' :
(Tochars && ((i = mutt_user_is_recipient (hdr)) < mutt_strlen (Tochars)) ? Tochars[i] : ' ')));
- mutt_format_s (dest, destlen, prefix, buf2);
+ colorlen = add_index_color(dest, destlen, flags, MT_COLOR_INDEX_FLAGS);
+ mutt_format_s (dest+colorlen, destlen-colorlen, prefix, buf2);
+ add_index_color(dest+colorlen, destlen-colorlen, flags, MT_COLOR_INDEX);
break;

case 'X':
@@ -687,7 +746,9 @@
if (optional)
optional = hdr->env->x_label ? 1 : 0;

- mutt_format_s (dest, destlen, prefix, NONULL (hdr->env->x_label));
+ colorlen = add_index_color(dest, destlen, flags, MT_COLOR_INDEX_LABEL);
+ mutt_format_s (dest+colorlen, destlen-colorlen, prefix, NONULL (hdr->env->x_label));
+ add_index_color(dest+colorlen, destlen-colorlen, flags, MT_COLOR_INDEX);
break;

case 'Y':
@@ -713,10 +774,12 @@
if (optional)
optional = i;

+ colorlen = add_index_color(dest, destlen, flags, MT_COLOR_INDEX_LABEL);
if (i)
- mutt_format_s (dest, destlen, prefix, NONULL (hdr->env->x_label));
+ mutt_format_s (dest+colorlen, destlen-colorlen, prefix, NONULL (hdr->env->x_label));
else
- mutt_format_s (dest, destlen, prefix, "");
+ mutt_format_s (dest+colorlen, destlen-colorlen, prefix, "");
+ add_index_color(dest+colorlen, destlen-colorlen, flags, MT_COLOR_INDEX);

break;

diff -ur mutt~/menu.c mutt/menu.c
--- mutt~/menu.c 2006-10-28 19:17:57.000000000 +0200
+++ mutt/menu.c 2006-10-28 19:30:54.000000000 +0200
@@ -37,7 +37,30 @@

extern size_t UngetCount;

-static void print_enriched_string (int attr, unsigned char *s, int do_color)
+static int get_color(int index, int type) {
+ COLOR_LINE *color;
+ HEADER *hdr = Context->hdrs[index];
+
+ switch (type) {
+ case MT_COLOR_INDEX_SUBJECT:
+ color = ColorIndexSubjectList;
+ break;
+ case MT_COLOR_INDEX_AUTHOR:
+ color = ColorIndexAuthorList;
+ break;
+ default:
+ return ColorDefs[type];
+ }
+
+ for (; color; color = color->next)
+ if (mutt_pattern_exec (color->color_pattern, M_MATCH_FULL_ADDRESS,
+ Context, hdr))
+ return color->pair;
+
+ return 0;
+}
+
+static void print_enriched_string (int index, int attr, unsigned char *s, int do_color)
{
wchar_t wc;
size_t k;
@@ -134,6 +157,18 @@
}
if (do_color) attrset(attr);
}
+ else if(*s == M_SPECIAL_INDEX)
+ {
+ s++;
+ if (do_color) {
+ if (*s == MT_COLOR_INDEX)
+ attrset(attr);
+ else
+ attron(get_color(index, *s));
+ }
+ s++;
+ n -= 2;
+ }
else if ((k = mbrtowc (&wc, (char *)s, n, &mbstate)) > 0)
{
addnstr ((char *)s, k);
@@ -235,7 +270,7 @@
addstr (" ");
}

- print_enriched_string (menu->color(i), (unsigned char *) buf, 1);
+ print_enriched_string (i, menu->color(i), (unsigned char *) buf, 1);
SETCOLOR (MT_COLOR_NORMAL);
}
else
@@ -249,7 +284,7 @@
}

CLEARLINE_WIN (i - menu->top + menu->offset);
- print_enriched_string (menu->color(i), (unsigned char *) buf, i != menu->current);
+ print_enriched_string (i, menu->color(i), (unsigned char *) buf, i != menu->current);
SETCOLOR (MT_COLOR_NORMAL);
BKGDSET (MT_COLOR_NORMAL);
}
@@ -286,7 +321,7 @@
menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent);
menu_pad_string (buf, sizeof (buf));
move (menu->oldcurrent + menu->offset - menu->top, SidebarWidth + 3);
- print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1);
+ print_enriched_string (menu->oldcurrent, menu->color(menu->oldcurrent), (unsigned char *) buf, 1);
SETCOLOR (MT_COLOR_NORMAL);
}

@@ -304,7 +339,7 @@
clrtoeol ();
menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent);
menu_pad_string (buf, sizeof (buf));
- print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1);
+ print_enriched_string (menu->oldcurrent, menu->color(menu->oldcurrent), (unsigned char *) buf, 1);

/* now draw the new one to reflect the change */
menu_make_entry (buf, sizeof (buf), menu, menu->current);
@@ -313,7 +348,7 @@
ADDCOLOR (MT_COLOR_INDICATOR);
BKGDSET (MT_COLOR_INDICATOR);
CLEARLINE_WIN (menu->current - menu->top + menu->offset);
- print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0);
+ print_enriched_string (menu->current, menu->color(menu->current), (unsigned char *) buf, 0);
SETCOLOR (MT_COLOR_NORMAL);
BKGDSET (MT_COLOR_NORMAL);
}
@@ -339,7 +374,7 @@
attrset (attr);
addch (' ');
menu_pad_string (buf, sizeof (buf));
- print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 1);
+ print_enriched_string (menu->current, menu->color(menu->current), (unsigned char *) buf, 1);
SETCOLOR (MT_COLOR_NORMAL);
}
else
@@ -348,7 +383,7 @@
ADDCOLOR (MT_COLOR_INDICATOR);
BKGDSET (MT_COLOR_INDICATOR);
clrtoeol ();
- print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0);
+ print_enriched_string (menu->current, menu->color(menu->current), (unsigned char *) buf, 0);
SETCOLOR (MT_COLOR_NORMAL);
BKGDSET (MT_COLOR_NORMAL);
}
diff -ur mutt~/mutt_curses.h mutt/mutt_curses.h
--- mutt~/mutt_curses.h 2006-10-28 19:17:57.000000000 +0200
+++ mutt/mutt_curses.h 2006-10-28 19:32:33.000000000 +0200
@@ -128,6 +128,16 @@
MT_COLOR_SIDEBAR,
MT_COLOR_UNDERLINE,
MT_COLOR_INDEX,
+ /* please no non-MT_COLOR_INDEX objects after this point */
+ MT_COLOR_INDEX_SUBJECT,
+ MT_COLOR_INDEX_AUTHOR,
+ /* below only index coloring stuff that doesn't have a colorline! */
+ MT_COLOR_INDEX_COLLAPSED,
+ MT_COLOR_INDEX_DATE,
+ MT_COLOR_INDEX_FLAGS,
+ MT_COLOR_INDEX_LABEL,
+ MT_COLOR_INDEX_NUMBER,
+ MT_COLOR_INDEX_SIZE,
MT_COLOR_NEW,
MT_COLOR_MAX
};
@@ -160,6 +170,8 @@
extern COLOR_LINE *ColorHdrList;
extern COLOR_LINE *ColorBodyList;
extern COLOR_LINE *ColorIndexList;
+extern COLOR_LINE *ColorIndexSubjectList;
+extern COLOR_LINE *ColorIndexAuthorList;

void ci_init_color (void);
void ci_start_color (void);
diff -ur mutt~/mutt.h mutt/mutt.h
--- mutt~/mutt.h 2006-10-28 19:17:57.000000000 +0200
+++ mutt/mutt.h 2006-10-28 19:20:15.000000000 +0200
@@ -180,6 +180,8 @@
#define M_TREE_MISSING 13
#define M_TREE_MAX 14

+#define M_SPECIAL_INDEX M_TREE_MAX
+
#define M_THREAD_COLLAPSE (1<<0)
#define M_THREAD_UNCOLLAPSE (1<<1)
#define M_THREAD_GET_HIDDEN (1<<2)
diff -ur mutt~/PATCHES mutt/PATCHES
--- mutt~/PATCHES 2006-10-28 19:17:57.000000000 +0200
+++ mutt/PATCHES 2006-10-28 19:20:15.000000000 +0200
@@ -1,3 +1,4 @@
+ca.cb.er.indexcolor
ak.sidebar-shortenname
nion.sidebar-color
ak.umask
--
"Talking much about oneself can also
be a means to conceal oneself."
-Friedrich Nietzsche
Andreas Kneib
2006-10-29 16:14:09 UTC
Permalink
Post by Elimar Riesebieter
This patch has to be noted as the last one in the series file.
Main indexcolor page: http://greek0.net/mutt.html Patch forward ported
to 1.5.11 by Christoph 'Myon' Berg (http://www.df7cb.de/) Myons patch
Thank you, Elimar! The Patch is very good. :)


Regardy
Andreas

Loading...