Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 1579:a2dd83167bc9
Fix display error in the roster
When displaying the group item counts in the roster, the number could
wrap -- and overwrite the vertical line.
Issue reported by "Dennis" in the MUC room.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 13 Apr 2009 22:48:48 +0200 |
parents | ece4f26bf9ff |
children | 8d1bcc83ae32 |
comparison
equal
deleted
inserted
replaced
1578:5bb4b580f229 | 1579:a2dd83167bc9 |
---|---|
1957 if (ishid){ | 1957 if (ishid){ |
1958 int group_count = 0; | 1958 int group_count = 0; |
1959 foreach_group_member(BUDDATA(buddy), increment_if_buddy_not_filtered, | 1959 foreach_group_member(BUDDATA(buddy), increment_if_buddy_not_filtered, |
1960 &group_count); | 1960 &group_count); |
1961 snprintf(rline, 4*Roster_Width, " %c+++ %s (%i)", pending, name, | 1961 snprintf(rline, 4*Roster_Width, " %c+++ %s (%i)", pending, name, |
1962 group_count); | 1962 group_count); |
1963 /* Do not display the item count if there isn't enough space */ | |
1964 if (g_utf8_strlen(rline, 4*Roster_Width) >= Roster_Width) | |
1965 snprintf(rline, 4*Roster_Width, " %c--- %s", pending, name); | |
1963 } | 1966 } |
1964 else | 1967 else |
1965 snprintf(rline, 4*Roster_Width, " %c--- %s", pending, name); | 1968 snprintf(rline, 4*Roster_Width, " %c--- %s", pending, name); |
1966 } else if (isspe) { | 1969 } else if (isspe) { |
1967 snprintf(rline, 4*Roster_Width, " %c%s", pending, name); | 1970 snprintf(rline, 4*Roster_Width, " %c%s", pending, name); |