Mercurial > pidgin.yaz
comparison src/protocols/silc/buddy.c @ 9285:7a8aa87164ae
[gaim-migrate @ 10088]
Ok I'm done. This started out as shx's patch to make add/remove
buddy/buddies take GaimBuddy and GaimGroup's in various places.
I think his diff was like 2000 lines and mine is like 5000. I
tried to clean up blist.c a bit and make it more uniform. There
are some more g_return_if_fail() checks. Removed some code that
was deprecated--it's probably been long enough. Removed some
#include <multi.h>'s. Make blist.xml saving happen on a timer,
like prefs.xml and accounts.xml.
Sorry if this doesn't merge cleanly with whatever you're doing.
People should really test this a lot.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 15 Jun 2004 02:37:27 +0000 |
parents | ac4480944fc3 |
children | ab845c8e2afe |
comparison
equal
deleted
inserted
replaced
9284:fe0291162312 | 9285:7a8aa87164ae |
---|---|
1320 silc_client_get_clients_whois(client, conn, name, NULL, attrs, | 1320 silc_client_get_clients_whois(client, conn, name, NULL, attrs, |
1321 silcgaim_add_buddy_resolved, r); | 1321 silcgaim_add_buddy_resolved, r); |
1322 silc_buffer_free(attrs); | 1322 silc_buffer_free(attrs); |
1323 } | 1323 } |
1324 | 1324 |
1325 void silcgaim_add_buddy(GaimConnection *gc, const char *name, GaimGroup *grp) | 1325 void silcgaim_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) |
1326 { | 1326 { |
1327 GaimBuddy *b; | 1327 silcgaim_add_buddy_i(gc, buddy, FALSE); |
1328 | 1328 } |
1329 b = gaim_find_buddy_in_group(gc->account, name, grp); | 1329 |
1330 if (!b) | 1330 void silcgaim_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, |
1331 return; | 1331 GaimGroup *group) |
1332 | 1332 { |
1333 silcgaim_add_buddy_i(gc, b, FALSE); | 1333 silc_free(buddy->proto_data); |
1334 } | |
1335 | |
1336 void silcgaim_add_buddies(GaimConnection *gc, GList *buddies) | |
1337 { | |
1338 while (buddies) { | |
1339 GaimBuddy *b; | |
1340 b = gaim_find_buddy(gc->account, buddies->data); | |
1341 if (!b) | |
1342 continue; | |
1343 silcgaim_add_buddy_i(gc, b, TRUE); | |
1344 buddies = buddies->next; | |
1345 } | |
1346 } | |
1347 | |
1348 void silcgaim_remove_buddy(GaimConnection *gc, const char *name, | |
1349 const char *group) | |
1350 { | |
1351 GaimBuddy *b; | |
1352 GaimGroup *g; | |
1353 | |
1354 g = gaim_find_group(group); | |
1355 b = gaim_find_buddy_in_group(gc->account, name, g); | |
1356 if (!b) | |
1357 return; | |
1358 | |
1359 silc_free(b->proto_data); | |
1360 } | 1334 } |
1361 | 1335 |
1362 void silcgaim_idle_set(GaimConnection *gc, int idle) | 1336 void silcgaim_idle_set(GaimConnection *gc, int idle) |
1363 | 1337 |
1364 { | 1338 { |