diff mcabber/src/screen.c @ 729:39f67cade02c

Use bold font for outgoing messages
author Mikael Berthe <mikael@lilotux.net>
date Mon, 06 Mar 2006 11:59:34 +0100
parents 421b337dc6d2
children e46c680bdd3d
line wrap: on
line diff
--- a/mcabber/src/screen.c	Mon Mar 06 10:25:24 2006 +0100
+++ b/mcabber/src/screen.c	Mon Mar 06 11:59:34 2006 +0100
@@ -407,19 +407,18 @@
           dir = '>';
         wprintw(win_entry->win, "%.11s #%c# ", date, dir);
       } 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);
+        wprintw(win_entry->win, "%.11s <== ", date);
       } 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);
+        wprintw(win_entry->win, "%.11s --> ", date);
       } else {
         wprintw(win_entry->win, "%.11s     ", date);
       }
-      wprintw(win_entry->win, "%s", line->text);      // line
+
+      // 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);
+
       wclrtoeol(win_entry->win);
       g_free(line->text);
     } else {
@@ -1012,7 +1011,7 @@
 
 void scr_WriteOutgoingMessage(const char *jidto, const char *text)
 {
-  scr_WriteMessage(jidto, text, 0, HBB_PREFIX_OUT);
+  scr_WriteMessage(jidto, text, 0, HBB_PREFIX_OUT|HBB_PREFIX_HLIGHT);
   scr_ShowWindow(jidto);
 }