From: <de...@us...> - 2006-09-30 03:08:52
|
Revision: 17406 http://svn.sourceforge.net/gaim/?rev=17406&view=rev Author: deryni9 Date: 2006-09-29 20:08:47 -0700 (Fri, 29 Sep 2006) Log Message: ----------- 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). Modified Paths: -------------- trunk/gtk/gtkblist.c Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2006-09-30 03:02:01 UTC (rev 17405) +++ trunk/gtk/gtkblist.c 2006-09-30 03:08:47 UTC (rev 17406) @@ -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("<span weight='bold'>%s</span>",esc); + mark = g_strdup_printf("<span weight='bold'>%s</span>%s", esc, group_count); else - mark = g_strdup_printf("<span color='#%02x%02x%02x' weight='bold'>%s</span>", + mark = g_strdup_printf("<span color='#%02x%02x%02x' weight='bold'>%s</span>%s", textcolor.red>>8, textcolor.green>>8, textcolor.blue>>8, - esc); + esc, group_count); g_free(esc); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |