Mercurial > hg
comparison mcabber/src/screen.c @ 1055:6eb1efea75d0
PGP: Visual encryption flag
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 27 Nov 2006 23:39:40 +0100 |
parents | ea71d31a2607 |
children | 5b3ecae91c95 |
comparison
equal
deleted
inserted
replaced
1054:082d55152a25 | 1055:6eb1efea75d0 |
---|---|
566 dir = '<'; | 566 dir = '<'; |
567 else if (line->flags & HBB_PREFIX_OUT) | 567 else if (line->flags & HBB_PREFIX_OUT) |
568 dir = '>'; | 568 dir = '>'; |
569 wprintw(win_entry->win, "%.11s #%c# ", date, dir); | 569 wprintw(win_entry->win, "%.11s #%c# ", date, dir); |
570 } else if (line->flags & HBB_PREFIX_IN) { | 570 } else if (line->flags & HBB_PREFIX_IN) { |
571 wprintw(win_entry->win, "%.11s <== ", date); | 571 char crypt = line->flags & HBB_PREFIX_PGPCRYPT ? '~' : '='; |
572 wprintw(win_entry->win, "%.11s <%c= ", date, crypt); | |
572 } else if (line->flags & HBB_PREFIX_OUT) { | 573 } else if (line->flags & HBB_PREFIX_OUT) { |
573 wprintw(win_entry->win, "%.11s --> ", date); | 574 char crypt = line->flags & HBB_PREFIX_PGPCRYPT ? '~' : '-'; |
575 wprintw(win_entry->win, "%.11s -%c> ", date, crypt); | |
574 } else if (line->flags & HBB_PREFIX_SPECIAL) { | 576 } else if (line->flags & HBB_PREFIX_SPECIAL) { |
575 strftime(date, 30, "%m-%d %H:%M:%S", localtime(&line->timestamp)); | 577 strftime(date, 30, "%m-%d %H:%M:%S", localtime(&line->timestamp)); |
576 wprintw(win_entry->win, "%.14s ", date); | 578 wprintw(win_entry->win, "%.14s ", date); |
577 } else { | 579 } else { |
578 wprintw(win_entry->win, "%.11s ", date); | 580 wprintw(win_entry->win, "%.11s ", date); |
1353 | 1355 |
1354 // If prefix is NULL, HBB_PREFIX_IN is supposed. | 1356 // If prefix is NULL, HBB_PREFIX_IN is supposed. |
1355 void scr_WriteIncomingMessage(const char *jidfrom, const char *text, | 1357 void scr_WriteIncomingMessage(const char *jidfrom, const char *text, |
1356 time_t timestamp, guint prefix) | 1358 time_t timestamp, guint prefix) |
1357 { | 1359 { |
1358 if (!(prefix & ~HBB_PREFIX_NOFLAG & ~HBB_PREFIX_HLIGHT)) | 1360 if (!(prefix & |
1361 ~HBB_PREFIX_NOFLAG & ~HBB_PREFIX_HLIGHT & ~HBB_PREFIX_PGPCRYPT)) | |
1359 prefix |= HBB_PREFIX_IN; | 1362 prefix |= HBB_PREFIX_IN; |
1360 | 1363 |
1361 scr_WriteMessage(jidfrom, text, timestamp, prefix); | 1364 scr_WriteMessage(jidfrom, text, timestamp, prefix); |
1362 update_panels(); | 1365 update_panels(); |
1363 } | 1366 } |
1364 | 1367 |
1365 void scr_WriteOutgoingMessage(const char *jidto, const char *text) | 1368 void scr_WriteOutgoingMessage(const char *jidto, const char *text, guint prefix) |
1366 { | 1369 { |
1367 scr_WriteMessage(jidto, text, 0, HBB_PREFIX_OUT|HBB_PREFIX_HLIGHT); | 1370 scr_WriteMessage(jidto, text, 0, prefix|HBB_PREFIX_OUT|HBB_PREFIX_HLIGHT); |
1368 scr_ShowWindow(jidto, FALSE); | 1371 scr_ShowWindow(jidto, FALSE); |
1369 } | 1372 } |
1370 | 1373 |
1371 static inline void set_autoaway(bool setaway) | 1374 static inline void set_autoaway(bool setaway) |
1372 { | 1375 { |