Mercurial > ~mikael > mcabber > hg
diff mcabber/src/screen.c @ 149:9f74832eb4f8
[/trunk] Changeset 161 by mikael
* Do not show message flag for unfolded groups.
* Add _GNU_SOURCE to main.c, for the getline() prototype...
author | mikael |
---|---|
date | Sat, 30 Apr 2005 23:06:42 +0000 |
parents | c3624b2a7059 |
children | b69c0b7a23e3 |
line wrap: on
line diff
--- a/mcabber/src/screen.c Sat Apr 30 22:45:00 2005 +0000 +++ b/mcabber/src/screen.c Sat Apr 30 23:06:42 2005 +0000 @@ -450,7 +450,7 @@ inputWnd = newwin(1, maxX, maxY-1, 0); inputPanel = new_panel(inputWnd); - scr_DrawRoster(); + update_roster = TRUE; return; } @@ -509,13 +509,18 @@ char status = '?'; char pending = ' '; enum imstatus budstate; + unsigned short ismsg = buddy_getflags(BUDDATA(buddy)) & ROSTER_FLAG_MSG; + unsigned short isgrp = buddy_gettype(BUDDATA(buddy)) & ROSTER_TYPE_GROUP; + unsigned short ishid = buddy_getflags(BUDDATA(buddy)) & ROSTER_FLAG_HIDE; if (rOffset > 0) { rOffset--; continue; } - if (buddy_getflags(BUDDATA(buddy)) & ROSTER_FLAG_MSG) { + // Display message notice if there is a message flag, but not + // for unfolded groups. + if (ismsg && (!isgrp || ishid)) { pending = '#'; } @@ -529,16 +534,16 @@ for (n = 0; n < maxx; n++) waddch(rosterWnd, ' '); } else { - if (buddy_getflags(BUDDATA(buddy)) & ROSTER_FLAG_MSG) + if (pending == '#') wattrset(rosterWnd, COLOR_PAIR(COLOR_NMSG)); else wattrset(rosterWnd, COLOR_PAIR(COLOR_BD_DES)); } strncpy(name, buddy_getname(BUDDATA(buddy)), ROSTER_WIDTH-7); - if (buddy_gettype(BUDDATA(buddy)) & ROSTER_TYPE_GROUP) { + if (isgrp) { char *sep; - if (buddy_getflags(BUDDATA(buddy)) & ROSTER_FLAG_HIDE) + if (ishid) sep = "+++"; else sep = "---";