Mercurial > hg
changeset 1513:9d78b571e693
Show '#' for unread message per buddy on the buddy status line
'~' is still displayed when chat mode is enabled. But when
it is disabled '#' is shown if there is an unread message
from the current buddy (including groups).
author | Maxim Vuets <maxim.vuets@gmail.com> |
---|---|
date | Sat, 06 Sep 2008 17:33:01 +0300 |
parents | 6d36a36a01c6 |
children | 939e2957f8a8 |
files | mcabber/src/screen.c |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/screen.c Sun Aug 31 22:52:11 2008 +0200 +++ b/mcabber/src/screen.c Sat Sep 06 17:33:01 2008 +0300 @@ -1607,9 +1607,6 @@ // Clear the line werase(chatstatusWnd); - if (chatmode) - wprintw(chatstatusWnd, "~"); - if (!current_buddy) { if (forceupdate) { update_panels(); @@ -1636,6 +1633,16 @@ isspe = 1; } + if (chatmode) { + wprintw(chatstatusWnd, "~"); + } else { + unsigned short bflags = buddy_getflags(BUDDATA(current_buddy)); + if (bflags & ROSTER_FLAG_MSG) { + // There is an unread message from the current buddy + wprintw(chatstatusWnd, "#"); + } + } + if (chatmode && !isgrp) { winbuf *win_entry; win_entry = scr_SearchWindow(buddy_getjid(BUDDATA(current_buddy)), isspe);