Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/screen.c @ 1504:9fafea381eb8
Show the number of unfiltered contacts in folded groups
author | franky |
---|---|
date | Sun, 31 Aug 2008 11:29:04 +0200 |
parents | c74cfe7fd848 |
children | 78137e986528 |
comparison
equal
deleted
inserted
replaced
1503:c74cfe7fd848 | 1504:9fafea381eb8 |
---|---|
1724 if (forceupdate) { | 1724 if (forceupdate) { |
1725 update_panels(); | 1725 update_panels(); |
1726 } | 1726 } |
1727 } | 1727 } |
1728 | 1728 |
1729 void increment_if_buddy_not_filtered(gpointer rosterdata, void *param) | |
1730 { | |
1731 int *p = param; | |
1732 if (buddylist_is_status_filtered(buddy_getstatus(rosterdata, NULL))) | |
1733 *p=*p+1; | |
1734 } | |
1735 | |
1729 // scr_DrawRoster() | 1736 // scr_DrawRoster() |
1730 // Display the buddylist (not really the roster) on the screen | 1737 // Display the buddylist (not really the roster) on the screen |
1731 void scr_DrawRoster(void) | 1738 void scr_DrawRoster(void) |
1732 { | 1739 { |
1733 static int offset = 0; | 1740 static int offset = 0; |
1887 g_utf8_strncpy(name, buddy_getname(BUDDATA(buddy)), Roster_Width-7); | 1894 g_utf8_strncpy(name, buddy_getname(BUDDATA(buddy)), Roster_Width-7); |
1888 else | 1895 else |
1889 name[0] = 0; | 1896 name[0] = 0; |
1890 | 1897 |
1891 if (isgrp) { | 1898 if (isgrp) { |
1892 char *sep; | 1899 if (ishid){ |
1893 if (ishid) | 1900 int group_count = 0; |
1894 sep = "+++"; | 1901 foreach_group_member(BUDDATA(buddy), increment_if_buddy_not_filtered, |
1902 &group_count); | |
1903 snprintf(rline, 4*Roster_Width, " %c+++ %s (%i)", pending, name, | |
1904 group_count); | |
1905 } | |
1895 else | 1906 else |
1896 sep = "---"; | 1907 snprintf(rline, 4*Roster_Width, " %c--- %s", pending, name); |
1897 snprintf(rline, 4*Roster_Width, " %c%s %s", pending, sep, name); | |
1898 } else if (isspe) { | 1908 } else if (isspe) { |
1899 snprintf(rline, 4*Roster_Width, " %c%s", pending, name); | 1909 snprintf(rline, 4*Roster_Width, " %c%s", pending, name); |
1900 } else { | 1910 } else { |
1901 char sepleft = '['; | 1911 char sepleft = '['; |
1902 char sepright = ']'; | 1912 char sepright = ']'; |