Mercurial > pidgin.yaz
changeset 12341:eea31c8cc9f7
[gaim-migrate @ 14645]
sf patch #1367967, from Sadrul Habib Chowdhury
"When a buddy goes offline, and that buddy-node was
being displayed in an expanded contact, or the buddy
was the only online node under a group, then the
going-out-the-door icon is not displayed. This patch is
a fix for that."
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 05 Dec 2005 04:10:08 +0000 |
parents | 11d14efe7be2 |
children | 0692d20d9d81 |
files | src/gtkblist.c |
diffstat | 1 files changed, 20 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkblist.c Mon Dec 05 03:53:00 2005 +0000 +++ b/src/gtkblist.c Mon Dec 05 04:10:08 2005 +0000 @@ -3874,6 +3874,7 @@ { GaimGroup *group; int count; + gboolean show = FALSE; g_return_if_fail(GAIM_BLIST_NODE_IS_GROUP(node)); @@ -3883,7 +3884,24 @@ count = gaim_blist_get_group_size(group, FALSE); else count = gaim_blist_get_group_online_count(group); - if(gaim_prefs_get_bool("/gaim/gtk/blist/show_empty_groups") || count > 0) { + + if (count > 0 || gaim_prefs_get_bool("/gaim/gtk/blist/show_empty_groups")) + show = TRUE; + else { + GaimBlistNode *n; + n = node->child; + while (n && !GAIM_BLIST_NODE_IS_GROUP(n)) { + if (GAIM_BLIST_NODE_IS_BUDDY(n)) { + if (buddy_is_displayable((GaimBuddy*)n)) { + show = TRUE; + break; + } + } + n = gaim_blist_node_next(n, FALSE); + } + } + + if (show) { char *mark, *esc; GtkTreeIter iter; @@ -4042,12 +4060,7 @@ gtkparentnode = (struct _gaim_gtk_blist_node *)node->parent->ui_data; - if (gtkparentnode->contact_expanded && - (gaim_presence_is_online(buddy->presence) || - (0 /* XXX: if we just signed off, need to show logout.png */) || - (gaim_account_is_connected(buddy->account) && - gaim_prefs_get_bool("/gaim/gtk/blist/show_offline_buddies")) || - gaim_blist_node_get_bool(node->parent, "show_offline"))) + if (gtkparentnode->contact_expanded && buddy_is_displayable(buddy)) { GtkTreeIter iter;