Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 682:f3945593432e
Small fix in scr_DrawRoster()
Improve changeset 1f8987e0e56c, sometimes the offset was not set to the best
value.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 29 Jan 2006 22:57:35 +0100 |
parents | 1f8987e0e56c |
children | ee03b56b93ee |
comparison
equal
deleted
inserted
replaced
681:8dc602a246a4 | 682:f3945593432e |
---|---|
732 } | 732 } |
733 | 733 |
734 // Update offset if necessary | 734 // Update offset if necessary |
735 // a) Try to show as many buddylist items as possible | 735 // a) Try to show as many buddylist items as possible |
736 i = g_list_length(buddylist) - maxy; | 736 i = g_list_length(buddylist) - maxy; |
737 if (0 <= i && i < offset) | 737 if (i < 0) |
738 i = 0; | |
739 if (i < offset) | |
738 offset = i; | 740 offset = i; |
739 // b) Make sure the current_buddy is visible | 741 // b) Make sure the current_buddy is visible |
740 i = g_list_position(buddylist, current_buddy); | 742 i = g_list_position(buddylist, current_buddy); |
741 if (i == -1) { // This is bad | 743 if (i == -1) { // This is bad |
742 scr_LogPrint(LPRINT_NORMAL, "Doh! Can't find current selected buddy!!"); | 744 scr_LogPrint(LPRINT_NORMAL, "Doh! Can't find current selected buddy!!"); |