Mercurial > pidgin.yaz
comparison src/blist.c @ 10557:a511fb614157
[gaim-migrate @ 11934]
make buddies go offline when the account goes offline
at some point we need to remove GaimBuddy->present and update anything using it to the new status stuff
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 29 Jan 2005 23:08:56 +0000 |
parents | 1596ade00664 |
children | 54f7939df8e3 |
comparison
equal
deleted
inserted
replaced
10556:3eff59ad7acb | 10557:a511fb614157 |
---|---|
2225 gboolean recompute = FALSE; | 2225 gboolean recompute = FALSE; |
2226 for (bnode = cnode->child; bnode; bnode = bnode->next) { | 2226 for (bnode = cnode->child; bnode; bnode = bnode->next) { |
2227 if (!GAIM_BLIST_NODE_IS_BUDDY(bnode)) | 2227 if (!GAIM_BLIST_NODE_IS_BUDDY(bnode)) |
2228 continue; | 2228 continue; |
2229 if (account == ((GaimBuddy *)bnode)->account) { | 2229 if (account == ((GaimBuddy *)bnode)->account) { |
2230 GaimPresence *presence; | |
2230 recompute = TRUE; | 2231 recompute = TRUE; |
2231 if (((GaimBuddy*)bnode)->present == GAIM_BUDDY_ONLINE || | 2232 if (((GaimBuddy*)bnode)->present == GAIM_BUDDY_ONLINE || |
2232 ((GaimBuddy*)bnode)->present == GAIM_BUDDY_SIGNING_ON) { | 2233 ((GaimBuddy*)bnode)->present == GAIM_BUDDY_SIGNING_ON) { |
2233 ((GaimContact*)cnode)->online--; | 2234 ((GaimContact*)cnode)->online--; |
2234 if (((GaimContact*)cnode)->online == 0) | 2235 if (((GaimContact*)cnode)->online == 0) |
2239 ((GaimContact*)cnode)->currentsize--; | 2240 ((GaimContact*)cnode)->currentsize--; |
2240 if (((GaimContact*)cnode)->currentsize == 0) | 2241 if (((GaimContact*)cnode)->currentsize == 0) |
2241 ((GaimGroup*)gnode)->currentsize--; | 2242 ((GaimGroup*)gnode)->currentsize--; |
2242 | 2243 |
2243 ((GaimBuddy*)bnode)->present = GAIM_BUDDY_OFFLINE; | 2244 ((GaimBuddy*)bnode)->present = GAIM_BUDDY_OFFLINE; |
2245 | |
2246 presence = gaim_buddy_get_presence((GaimBuddy*)bnode); | |
2247 gaim_presence_set_status_active(presence, "offline", TRUE); | |
2244 | 2248 |
2245 ((GaimBuddy*)bnode)->uc = 0; | 2249 ((GaimBuddy*)bnode)->uc = 0; |
2246 /* TODO: ((GaimBuddy*)bnode)->idle = 0; */ | 2250 /* TODO: ((GaimBuddy*)bnode)->idle = 0; */ |
2247 | 2251 |
2248 if (ops && ops->remove) | 2252 if (ops && ops->remove) |