comparison src/conversation.c @ 10805:4151d16f6348

[gaim-migrate @ 12453] i vote this goes away committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 10 Apr 2005 02:22:15 +0000
parents 51ea57c36056
children 8d52201620d0
comparison
equal deleted inserted replaced
10804:6dcfec6f2f7c 10805:4151d16f6348
1349 { 1349 {
1350 return chats; 1350 return chats;
1351 } 1351 }
1352 1352
1353 1353
1354 /*
1355 * This is deprecated, right? --SomeOne
1356 *
1357 * I don't know, I could see uses for it. Specifically, a plugin
1358 * that wants to know if you're talking to a specific person.
1359 * --KingAnt
1360 */
1361 GaimConversation *
1362 gaim_find_conversation(GaimConversationType type,
1363 const char *name)
1364 {
1365 GaimConversation *c = NULL;
1366 gchar *name1;
1367 const gchar *name2;
1368 GList *cnv;
1369
1370 g_return_val_if_fail(name != NULL, NULL);
1371
1372 name1 = g_strdup(gaim_normalize(NULL, name));
1373
1374 for (cnv = gaim_get_conversations(); cnv != NULL; cnv = cnv->next) {
1375 c = (GaimConversation *)cnv->data;
1376 name2 = gaim_normalize(NULL, gaim_conversation_get_name(c));
1377
1378 if (((type == GAIM_CONV_ANY) || (type == gaim_conversation_get_type(c))) &&
1379 !gaim_utf8_strcasecmp(name1, name2))
1380 break;
1381
1382 c = NULL;
1383 }
1384
1385 g_free(name1);
1386
1387 return c;
1388 }
1389
1390 GaimConversation * 1354 GaimConversation *
1391 gaim_find_conversation_with_account(GaimConversationType type, 1355 gaim_find_conversation_with_account(GaimConversationType type,
1392 const char *name, 1356 const char *name,
1393 const GaimAccount *account) 1357 const GaimAccount *account)
1394 { 1358 {