Mercurial > ~mikael > mcabber > hg
diff mcabber/src/screen.c @ 730:e46c680bdd3d
New color: color_highlight (for outgoing messages)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 06 Mar 2006 12:16:23 +0100 |
parents | 39f67cade02c |
children | f30031cdb56b |
line wrap: on
line diff
--- a/mcabber/src/screen.c Mon Mar 06 11:59:34 2006 +0100 +++ b/mcabber/src/screen.c Mon Mar 06 12:16:23 2006 +0100 @@ -127,9 +127,10 @@ static void ParseColors(void) { - const char *colors[9] = { + const char *colors[10] = { "", "", "general", + "highlight", "status", "roster", "rostersel", @@ -165,6 +166,10 @@ init_pair(i+1, ((color) ? FindColor(color) : COLOR_WHITE), FindColor(background)); break; + case COLOR_HIGHLIGHT: + init_pair(i+1, ((color) ? FindColor(color) : COLOR_YELLOW), + FindColor(background)); + break; case COLOR_STATUS: init_pair(i+1, ((color) ? FindColor(color) : COLOR_WHITE), FindColor(backstatus)); @@ -388,6 +393,9 @@ // NOTE: update PREFIX_WIDTH if you change the date format!! // You need to set it to the whole prefix length + 1 if (line) { + if (line->flags & HBB_PREFIX_HLIGHT) + wattrset(win_entry->win, COLOR_PAIR(COLOR_HIGHLIGHT)); + if (line->timestamp) { strftime(date, 30, "%m-%d %H:%M", localtime(&line->timestamp)); } else @@ -414,11 +422,10 @@ wprintw(win_entry->win, "%.11s ", date); } - // Display line - if (line->flags & HBB_PREFIX_HLIGHT) wattron(win_entry->win, A_BOLD); - wprintw(win_entry->win, "%s", line->text); - if (line->flags & HBB_PREFIX_HLIGHT) wattroff(win_entry->win, A_BOLD); + wprintw(win_entry->win, "%s", line->text); // Display text line + if (line->flags & HBB_PREFIX_HLIGHT) + wattrset(win_entry->win, COLOR_PAIR(COLOR_GENERAL)); wclrtoeol(win_entry->win); g_free(line->text); } else {