mcabber/src/screen.c
changeset 728 421b337dc6d2
parent 727 1c3620668857
child 729 39f67cade02c
equal deleted inserted replaced
727:1c3620668857 728:421b337dc6d2
   404         if (line->flags & HBB_PREFIX_IN)
   404         if (line->flags & HBB_PREFIX_IN)
   405           dir = '<';
   405           dir = '<';
   406         else if (line->flags & HBB_PREFIX_OUT)
   406         else if (line->flags & HBB_PREFIX_OUT)
   407           dir = '>';
   407           dir = '>';
   408         wprintw(win_entry->win, "%.11s #%c# ", date, dir);
   408         wprintw(win_entry->win, "%.11s #%c# ", date, dir);
   409       } else if (line->flags & HBB_PREFIX_IN)
   409       } else if (line->flags & HBB_PREFIX_IN) {
   410         wprintw(win_entry->win, "%.11s <== ", date);
   410         wprintw(win_entry->win, "%.11s", date);
   411       else if (line->flags & HBB_PREFIX_OUT)
   411         if (line->flags & HBB_PREFIX_HLIGHT) wattron(win_entry->win, A_BOLD);
   412         wprintw(win_entry->win, "%.11s --> ", date);
   412         wprintw(win_entry->win, " <== ", date);
   413       else {
   413         if (line->flags & HBB_PREFIX_HLIGHT) wattroff(win_entry->win, A_BOLD);
       
   414       } else if (line->flags & HBB_PREFIX_OUT) {
       
   415         wprintw(win_entry->win, "%.11s", date);
       
   416         wattron(win_entry->win, A_BOLD);
       
   417         wprintw(win_entry->win, " --> ", date);
       
   418         wattroff(win_entry->win, A_BOLD);
       
   419       } else {
   414         wprintw(win_entry->win, "%.11s     ", date);
   420         wprintw(win_entry->win, "%.11s     ", date);
   415       }
   421       }
   416       wprintw(win_entry->win, "%s", line->text);      // line
   422       wprintw(win_entry->win, "%s", line->text);      // line
   417       wclrtoeol(win_entry->win);
   423       wclrtoeol(win_entry->win);
   418       g_free(line->text);
   424       g_free(line->text);
   994 
  1000 
   995 // If prefix is NULL, HBB_PREFIX_IN is supposed.
  1001 // If prefix is NULL, HBB_PREFIX_IN is supposed.
   996 void scr_WriteIncomingMessage(const char *jidfrom, const char *text,
  1002 void scr_WriteIncomingMessage(const char *jidfrom, const char *text,
   997         time_t timestamp, guint prefix)
  1003         time_t timestamp, guint prefix)
   998 {
  1004 {
   999   if (!(prefix & ~HBB_PREFIX_NOFLAG))
  1005   if (!(prefix & ~HBB_PREFIX_NOFLAG & ~HBB_PREFIX_HLIGHT))
  1000     prefix |= HBB_PREFIX_IN;
  1006     prefix |= HBB_PREFIX_IN;
  1001 
  1007 
  1002   scr_WriteMessage(jidfrom, text, timestamp, prefix);
  1008   scr_WriteMessage(jidfrom, text, timestamp, prefix);
  1003   update_panels();
  1009   update_panels();
  1004   doupdate();
  1010   doupdate();