# HG changeset patch # User mikael # Date 1114902402 0 # Node ID 9f74832eb4f8d6c7e319852f5d17748138c5b5d6 # Parent c3624b2a70596cd47d8772bc2971ef7124d0ab61 [/trunk] Changeset 161 by mikael * Do not show message flag for unfolded groups. * Add _GNU_SOURCE to main.c, for the getline() prototype... diff -r c3624b2a7059 -r 9f74832eb4f8 mcabber/src/TODO --- a/mcabber/src/TODO Sat Apr 30 22:45:00 2005 +0000 +++ b/mcabber/src/TODO Sat Apr 30 23:06:42 2005 +0000 @@ -2,7 +2,6 @@ BUGS: * Presence notification is always accepted. -* Do not show message flag for unfolded groups. * Resize not handled. * I have seen a segfault, but don't know how to reproduce it... diff -r c3624b2a7059 -r 9f74832eb4f8 mcabber/src/main.c --- a/mcabber/src/main.c Sat Apr 30 22:45:00 2005 +0000 +++ b/mcabber/src/main.c Sat Apr 30 23:06:42 2005 +0000 @@ -1,3 +1,4 @@ +#define _GNU_SOURCE #include #include #include diff -r c3624b2a7059 -r 9f74832eb4f8 mcabber/src/screen.c --- 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 = "---";