# HG changeset patch # User mikael # Date 1114510317 0 # Node ID 1bdf882bed98f47cfdacf36f05ae84dd6781d65f # Parent 235fdd5bfd5d722a393b7472eba59d62c69b80c1 [/trunk] Changeset 136 by mikael * Fix a display problem when there is only one buddy connected and hide_offline is set and this buddy goes offline. diff -r 235fdd5bfd5d -r 1bdf882bed98 mcabber/src/TODO.txt --- a/mcabber/src/TODO.txt Tue Apr 26 09:37:05 2005 +0000 +++ b/mcabber/src/TODO.txt Tue Apr 26 10:11:57 2005 +0000 @@ -4,9 +4,7 @@ * Should not stay on buddy buffer when one moves to a group * Pending message not displayed if buddy outside Contact window * We should rebuild the buddy list when receiving a message from an offline - buddy. -* Bad display when there is only one buddy connected and hide_offline is set - and this buddy goes offline. + buddy (or invisible/just hidden). TODO: diff -r 235fdd5bfd5d -r 1bdf882bed98 mcabber/src/screen.c --- a/mcabber/src/screen.c Tue Apr 26 09:37:05 2005 +0000 +++ b/mcabber/src/screen.c Tue Apr 26 10:11:57 2005 +0000 @@ -446,6 +446,9 @@ int i, n; int rOffset; + // We can reset update_roster + update_roster = FALSE; + getmaxyx(rosterWnd, maxy, maxx); maxx --; // last char is for vertical border name[ROSTER_WIDTH-7] = 0; @@ -461,6 +464,8 @@ // Leave now if buddylist is empty if (!buddylist) { offset = 0; + update_panels(); + doupdate(); return; } @@ -468,6 +473,8 @@ i = g_list_position(buddylist, current_buddy); if (i == -1) { // This is bad scr_LogPrint("Doh! Can't find current selected buddy!!"); + update_panels(); + doupdate(); return; } else if (i < offset) { offset = i; @@ -516,7 +523,6 @@ update_panels(); doupdate(); - update_roster = FALSE; } void scr_WriteMessage(const char *jid, const char *text, char *prefix)