From: <aar...@us...> - 2006-06-11 00:42:46
|
Revision: 16253 Author: aaronsheldon Date: 2006-06-10 17:42:41 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16253&view=rev Log Message: ----------- Mostly style corrections, but also corrects a bug that causes right-clicking groups to have incorrect behavior. Modified Paths: -------------- branches/soc-2006-blist-efficiency/src/gtkblist.c Modified: branches/soc-2006-blist-efficiency/src/gtkblist.c =================================================================== --- branches/soc-2006-blist-efficiency/src/gtkblist.c 2006-06-11 00:35:52 UTC (rev 16252) +++ branches/soc-2006-blist-efficiency/src/gtkblist.c 2006-06-11 00:42:41 UTC (rev 16253) @@ -4083,19 +4083,17 @@ GaimGroup *group; int count; gboolean show = FALSE; - gboolean buddy_node_true = FALSE; - GaimBlistNode* bnode; - - - buddy_node_true = GAIM_BLIST_NODE_IS_BUDDY(node); + GaimBlistNode* gnode; + + if (GAIM_BLIST_NODE_IS_GROUP(node)) - bnode = node; - else if (buddy_node_true) - bnode = node->parent->parent; - g_return_if_fail(GAIM_BLIST_NODE_IS_GROUP(bnode)); - - group = (GaimGroup*)bnode; + gnode = node; + else if (GAIM_BLIST_NODE_IS_BUDDY(node)) + gnode = node->parent->parent; + g_return_if_fail(GAIM_BLIST_NODE_IS_GROUP(gnode)); + group = (GaimGroup*)gnode; + if(gaim_prefs_get_bool("/gaim/gtk/blist/show_offline_buddies")) count = gaim_blist_get_group_size(group, FALSE); else @@ -4103,13 +4101,13 @@ if (count > 0 || gaim_prefs_get_bool("/gaim/gtk/blist/show_empty_groups")) show = TRUE; - else if (buddy_node_true) + else if (GAIM_BLIST_NODE_IS_BUDDY(node)){ if (buddy_is_displayable((GaimBuddy*)node)) show = TRUE; /* Fallback loop */ - else { + } else { GaimBlistNode *n; - n = bnode->child; + n = gnode->child; while (n && !GAIM_BLIST_NODE_IS_GROUP(n)) { if (GAIM_BLIST_NODE_IS_BUDDY(n)) { if (buddy_is_displayable((GaimBuddy*)n)) { @@ -4120,12 +4118,12 @@ n = gaim_blist_node_next(n, FALSE); } } - + if (show) { char *mark, *esc; GtkTreeIter iter; - if(!insert_node(list, bnode, &iter)) + if(!insert_node(list, gnode, &iter)) return; esc = g_markup_escape_text(group->name, -1); @@ -4138,11 +4136,11 @@ STATUS_ICON_COLUMN, NULL, STATUS_ICON_VISIBLE_COLUMN, FALSE, NAME_COLUMN, mark, - NODE_COLUMN, node, + NODE_COLUMN, gnode, -1); g_free(mark); } else { - gaim_gtk_blist_hide_node(list, bnode); + gaim_gtk_blist_hide_node(list, gnode); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |