# HG changeset patch # User Etan Reisner # Date 1159585727 0 # Node ID 8617e34e30da12dd0df493cfbd9a5bf87e5de798 # Parent 897d2d09787e9b40a45085853632b1274ca927eb [gaim-migrate @ 17406] It was discussed on gaim-devel a little while ago that having group counts on collapsed groups might be a good idea, so here that is. It's not perfect, there seem to be some redrawing issues here, the blist row doesn't get redrawn until you select a different row, but I'm not sure that there's anything to do about that (and even if there is I don't know what). committer: Tailor Script diff -r 897d2d09787e -r 8617e34e30da gtk/gtkblist.c --- a/gtk/gtkblist.c Sat Sep 30 03:02:01 2006 +0000 +++ b/gtk/gtkblist.c Sat Sep 30 03:08:47 2006 +0000 @@ -4385,10 +4385,11 @@ show = TRUE;} if (show) { + char group_count[12] = ""; char *mark, *esc; GtkTreeIter iter; GtkTreePath *path; - gboolean expanded; + gboolean expanded; GdkColor bgcolor; GdkColor textcolor; @@ -4402,13 +4403,19 @@ expanded = gtk_tree_view_row_expanded(GTK_TREE_VIEW(gtkblist->treeview), path); gtk_tree_path_free(path); + if (!expanded) { + g_snprintf(group_count, sizeof(group_count), " (%d/%d)", + gaim_blist_get_group_online_count(group), + gaim_blist_get_group_size(group, FALSE)); + } + esc = g_markup_escape_text(group->name, -1); if (selected) - mark = g_strdup_printf("%s",esc); + mark = g_strdup_printf("%s%s", esc, group_count); else - mark = g_strdup_printf("%s", + mark = g_strdup_printf("%s%s", textcolor.red>>8, textcolor.green>>8, textcolor.blue>>8, - esc); + esc, group_count); g_free(esc);