Mercurial > hg
changeset 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 | 5647381a7dfb |
files | mcabber/src/TODO mcabber/src/main.c mcabber/src/screen.c |
diffstat | 3 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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...
--- 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 <stdio.h> #include <stdlib.h> #include <unistd.h>
--- 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 = "---";