comparison src/multi.c @ 5234:890b29f00b68

[gaim-migrate @ 5604] Chats in the buddy list! You can now put chat rooms in your buddy list, and double-click them to join them, instead of having to do all that typing. I'm eventually gonna add auto-join support, so that ugly hack involving pouncing can go away. Someone should make some new artwork so we don't have 2 + icons next to each other in the menus. This also has some fixes to let gaim compile again, after the renaming of the buddy list files. This also fixes the problem with offline buddies not showing up in the list sometimes for accounts that didn't log in at startup. This probably fixes other stuff, but I can't remember any of it off the top of my head. I'm going to stop typing and let people play with this now. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 26 Apr 2003 20:30:43 +0000
parents 1a53330dfd34
children 1f901484599d
comparison
equal deleted inserted replaced
5233:202105dbed8f 5234:890b29f00b68
165 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { 165 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) {
166 if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) 166 if(!GAIM_BLIST_NODE_IS_GROUP(gnode))
167 continue; 167 continue;
168 m = (struct group *)gnode; 168 m = (struct group *)gnode;
169 for(bnode = gnode->child; bnode; bnode = bnode->next) { 169 for(bnode = gnode->child; bnode; bnode = bnode->next) {
170 if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) 170 if(GAIM_BLIST_NODE_IS_BUDDY(bnode)) {
171 continue; 171 n = (struct buddy *)bnode;
172 n = (struct buddy *)bnode; 172 if(n->account == gc->account) {
173 if(n->account == gc->account) { 173 n->present = GAIM_BUDDY_OFFLINE;
174 n->present = GAIM_BUDDY_OFFLINE; 174 }
175 } 175 }
176 } 176 }
177 } 177 }
178 g_free(gc->away); 178 g_free(gc->away);
179 g_free(gc->away_state); 179 g_free(gc->away_state);
1461 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { 1461 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) {
1462 struct group *g = (struct group *)gnode; 1462 struct group *g = (struct group *)gnode;
1463 if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) 1463 if(!GAIM_BLIST_NODE_IS_GROUP(gnode))
1464 continue; 1464 continue;
1465 for(bnode = gnode->child; bnode; bnode = bnode->next) { 1465 for(bnode = gnode->child; bnode; bnode = bnode->next) {
1466 struct buddy *b = (struct buddy *)bnode; 1466 if(GAIM_BLIST_NODE_IS_BUDDY(bnode)) {
1467 if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) 1467 struct buddy *b = (struct buddy *)bnode;
1468 continue; 1468 if(b->account == account)
1469 if(b->account == account) { 1469 gaim_blist_remove_buddy(b);
1470 gaim_blist_remove_buddy(b); 1470 } else if(GAIM_BLIST_NODE_IS_CHAT(bnode)) {
1471 struct chat *chat = (struct chat *)bnode;
1472 if(chat->account == account)
1473 gaim_blist_remove_chat(chat);
1471 } 1474 }
1472 } 1475 }
1473 if(!gnode->child) { 1476 if(!gnode->child) {
1474 gaim_blist_remove_group(g); 1477 gaim_blist_remove_group(g);
1475 } 1478 }
1704 1707
1705 update_privacy_connections(); 1708 update_privacy_connections();
1706 do_away_menu(); 1709 do_away_menu();
1707 do_proto_menu(); 1710 do_proto_menu();
1708 1711
1712 gaim_blist_add_account(gc->account);
1713
1709 /* 1714 /*
1710 * XXX This is a hack! Remove this and replace it with a better event 1715 * XXX This is a hack! Remove this and replace it with a better event
1711 * notification system. 1716 * notification system.
1712 */ 1717 */
1713 for (wins = gaim_get_windows(); wins != NULL; wins = wins->next) { 1718 for (wins = gaim_get_windows(); wins != NULL; wins = wins->next) {
1742 /* let the prpl know what buddies we pulled out of the local list */ 1747 /* let the prpl know what buddies we pulled out of the local list */
1743 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { 1748 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) {
1744 if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) 1749 if(!GAIM_BLIST_NODE_IS_GROUP(gnode))
1745 continue; 1750 continue;
1746 for(bnode = gnode->child; bnode; bnode = bnode->next) { 1751 for(bnode = gnode->child; bnode; bnode = bnode->next) {
1747 struct buddy *b = (struct buddy *)bnode; 1752 if(GAIM_BLIST_NODE_IS_BUDDY(bnode)) {
1748 if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) 1753 struct buddy *b = (struct buddy *)bnode;
1749 continue; 1754 if(b->account == gc->account) {
1750 if(b->account == gc->account) { 1755 add_buds = g_list_append(add_buds, b->name);
1751 add_buds = g_list_append(add_buds, b->name); 1756 }
1752 } 1757 }
1753 } 1758 }
1754 } 1759 }
1755 1760
1756 if(add_buds) { 1761 if(add_buds) {