Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/screen.c @ 1960:b596bcff758e
Add 'color_readmark'
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 14 Mar 2011 23:45:24 +0100 |
parents | e3e8fb918d56 |
children | 39021fd6b0e1 |
comparison
equal
deleted
inserted
replaced
1959:ed97057f0881 | 1960:b596bcff758e |
---|---|
439 "rostersel", | 439 "rostersel", |
440 "rosterselmsg", | 440 "rosterselmsg", |
441 "rosternewmsg", | 441 "rosternewmsg", |
442 "info", | 442 "info", |
443 "msgin", | 443 "msgin", |
444 "readmark", | |
444 NULL | 445 NULL |
445 }; | 446 }; |
446 | 447 |
447 const char *color; | 448 const char *color; |
448 const char *background = settings_opt_get("color_background"); | 449 const char *background = settings_opt_get("color_background"); |
514 init_pair(i+1, ((color) ? find_color(color) : COLOR_WHITE), | 515 init_pair(i+1, ((color) ? find_color(color) : COLOR_WHITE), |
515 find_color(background)); | 516 find_color(background)); |
516 break; | 517 break; |
517 case COLOR_MSGIN: | 518 case COLOR_MSGIN: |
518 init_pair(i+1, ((color) ? find_color(color) : COLOR_WHITE), | 519 init_pair(i+1, ((color) ? find_color(color) : COLOR_WHITE), |
520 find_color(background)); | |
521 break; | |
522 case COLOR_READMARK: | |
523 init_pair(i+1, ((color) ? find_color(color) : COLOR_RED), | |
519 find_color(background)); | 524 find_color(background)); |
520 break; | 525 break; |
521 } | 526 } |
522 } | 527 } |
523 for (i = COLOR_max; i < (COLOR_max + COLORS); i++) | 528 for (i = COLOR_max; i < (COLOR_max + COLORS); i++) |
1291 mark_offset++; | 1296 mark_offset++; |
1292 | 1297 |
1293 // Display the mark | 1298 // Display the mark |
1294 winy = n + mark_offset; | 1299 winy = n + mark_offset; |
1295 wmove(win_entry->win, winy, 0); | 1300 wmove(win_entry->win, winy, 0); |
1301 wattrset(win_entry->win, get_color(COLOR_READMARK)); | |
1296 g_snprintf(pref, prefixwidth, " == "); | 1302 g_snprintf(pref, prefixwidth, " == "); |
1297 wprintw(win_entry->win, pref); | 1303 wprintw(win_entry->win, pref); |
1298 w = scr_gettextwidth() / 3; | 1304 w = scr_gettextwidth() / 3; |
1299 for (i=0; i<w; i++) | 1305 for (i=0; i<w; i++) |
1300 wprintw(win_entry->win, "== "); | 1306 wprintw(win_entry->win, "== "); |
1301 wclrtoeol(win_entry->win); | 1307 wclrtoeol(win_entry->win); |
1308 wattrset(win_entry->win, get_color(COLOR_GENERAL)); | |
1302 } | 1309 } |
1303 | 1310 |
1304 g_free(line->text); | 1311 g_free(line->text); |
1305 g_free(line); | 1312 g_free(line); |
1306 } else { | 1313 } else { |