diff mcabber/src/screen.c @ 723:23068490d063

Add text color when the selected buddy has an unread message (Only when chat mode is disabled, of course.)
author Mikael Berthe <mikael@lilotux.net>
date Sun, 05 Mar 2006 11:00:24 +0100
parents 9cf31c9b1dc4
children 264375fe7159
line wrap: on
line diff
--- a/mcabber/src/screen.c	Sun Mar 05 10:43:36 2006 +0100
+++ b/mcabber/src/screen.c	Sun Mar 05 11:00:24 2006 +0100
@@ -127,12 +127,13 @@
 
 static void ParseColors(void)
 {
-  const char *colors[8] = {
+  const char *colors[9] = {
     "", "",
     "general",
     "status",
     "roster",
     "rostersel",
+    "rosterselmsg",
     "rosternewmsg",
     NULL
   };
@@ -176,6 +177,10 @@
       init_pair(i+1, ((color) ? FindColor(color) : COLOR_BLUE),
                 FindColor(backselected));
       break;
+    case COLOR_ROSTERSELNMSG:
+      init_pair(i+1, ((color) ? FindColor(color) : COLOR_RED),
+                FindColor(backselected));
+      break;
     case COLOR_ROSTERNMSG:
       init_pair(i+1, ((color) ? FindColor(color) : COLOR_RED),
                 FindColor(background));
@@ -897,8 +902,11 @@
         status = imstatus2char[budstate];
     }
     if (buddy == current_buddy) {
-      wattrset(rosterWnd, COLOR_PAIR(COLOR_ROSTERSEL));
-      // The 3 following lines aim to color the whole line
+      if (pending == '#')
+        wattrset(rosterWnd, COLOR_PAIR(COLOR_ROSTERSELNMSG));
+      else
+        wattrset(rosterWnd, COLOR_PAIR(COLOR_ROSTERSEL));
+      // The 3 following lines aim at coloring the whole line
       wmove(rosterWnd, i, 0);
       for (n = 0; n < maxx; n++)
         waddch(rosterWnd, ' ');