diff mcabber/src/screen.c @ 728:421b337dc6d2

Chat window: Highlight the flag in our messages
author Mikael Berthe <mikael@lilotux.net>
date Mon, 06 Mar 2006 10:25:24 +0100
parents 1c3620668857
children 39f67cade02c
line wrap: on
line diff
--- a/mcabber/src/screen.c	Sun Mar 05 22:29:14 2006 +0100
+++ b/mcabber/src/screen.c	Mon Mar 06 10:25:24 2006 +0100
@@ -406,11 +406,17 @@
         else if (line->flags & HBB_PREFIX_OUT)
           dir = '>';
         wprintw(win_entry->win, "%.11s #%c# ", date, dir);
-      } else if (line->flags & HBB_PREFIX_IN)
-        wprintw(win_entry->win, "%.11s <== ", date);
-      else if (line->flags & HBB_PREFIX_OUT)
-        wprintw(win_entry->win, "%.11s --> ", date);
-      else {
+      } else if (line->flags & HBB_PREFIX_IN) {
+        wprintw(win_entry->win, "%.11s", date);
+        if (line->flags & HBB_PREFIX_HLIGHT) wattron(win_entry->win, A_BOLD);
+        wprintw(win_entry->win, " <== ", date);
+        if (line->flags & HBB_PREFIX_HLIGHT) wattroff(win_entry->win, A_BOLD);
+      } else if (line->flags & HBB_PREFIX_OUT) {
+        wprintw(win_entry->win, "%.11s", date);
+        wattron(win_entry->win, A_BOLD);
+        wprintw(win_entry->win, " --> ", date);
+        wattroff(win_entry->win, A_BOLD);
+      } else {
         wprintw(win_entry->win, "%.11s     ", date);
       }
       wprintw(win_entry->win, "%s", line->text);      // line
@@ -996,7 +1002,7 @@
 void scr_WriteIncomingMessage(const char *jidfrom, const char *text,
         time_t timestamp, guint prefix)
 {
-  if (!(prefix & ~HBB_PREFIX_NOFLAG))
+  if (!(prefix & ~HBB_PREFIX_NOFLAG & ~HBB_PREFIX_HLIGHT))
     prefix |= HBB_PREFIX_IN;
 
   scr_WriteMessage(jidfrom, text, timestamp, prefix);