Mercurial > pidgin.yaz
comparison src/conversation.c @ 7261:1930e3d00ecd
[gaim-migrate @ 7838]
prpl-specific normalize is back, after my crusade to kill it.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 14 Oct 2003 05:07:39 +0000 |
parents | 31abca48a631 |
children | 643cbc9a6035 |
comparison
equal
deleted
inserted
replaced
7260:49839c4cbb1c | 7261:1930e3d00ecd |
---|---|
1291 gaim_get_chats(void) | 1291 gaim_get_chats(void) |
1292 { | 1292 { |
1293 return chats; | 1293 return chats; |
1294 } | 1294 } |
1295 | 1295 |
1296 | |
1297 /* This is deprecated, right? */ | |
1296 GaimConversation * | 1298 GaimConversation * |
1297 gaim_find_conversation(const char *name) | 1299 gaim_find_conversation(const char *name) |
1298 { | 1300 { |
1299 GaimConversation *c = NULL; | 1301 GaimConversation *c = NULL; |
1300 char *cuser; | 1302 char *cuser; |
1301 GList *cnv; | 1303 GList *cnv; |
1302 | 1304 |
1303 g_return_val_if_fail(name != NULL, NULL); | 1305 g_return_val_if_fail(name != NULL, NULL); |
1304 | 1306 |
1305 cuser = g_strdup(gaim_normalize(name)); | 1307 cuser = g_strdup(gaim_normalize(NULL, name)); |
1306 | 1308 |
1307 for (cnv = gaim_get_conversations(); cnv != NULL; cnv = cnv->next) { | 1309 for (cnv = gaim_get_conversations(); cnv != NULL; cnv = cnv->next) { |
1308 c = (GaimConversation *)cnv->data; | 1310 c = (GaimConversation *)cnv->data; |
1309 | 1311 |
1310 if (!gaim_utf8_strcasecmp(cuser, gaim_normalize(gaim_conversation_get_name(c)))) | 1312 if (!gaim_utf8_strcasecmp(cuser, gaim_normalize(NULL, gaim_conversation_get_name(c)))) |
1311 break; | 1313 break; |
1312 | 1314 |
1313 c = NULL; | 1315 c = NULL; |
1314 } | 1316 } |
1315 | 1317 |
1326 char *cuser; | 1328 char *cuser; |
1327 GList *cnv; | 1329 GList *cnv; |
1328 | 1330 |
1329 g_return_val_if_fail(name != NULL, NULL); | 1331 g_return_val_if_fail(name != NULL, NULL); |
1330 | 1332 |
1331 cuser = g_strdup(gaim_normalize(name)); | 1333 cuser = g_strdup(gaim_normalize(account, name)); |
1332 | 1334 |
1333 for (cnv = gaim_get_conversations(); cnv != NULL; cnv = cnv->next) { | 1335 for (cnv = gaim_get_conversations(); cnv != NULL; cnv = cnv->next) { |
1334 c = (GaimConversation *)cnv->data; | 1336 c = (GaimConversation *)cnv->data; |
1335 | 1337 |
1336 if (!gaim_utf8_strcasecmp(cuser, | 1338 if (!gaim_utf8_strcasecmp(cuser, |
1337 gaim_normalize(gaim_conversation_get_name(c))) && | 1339 gaim_normalize(account, gaim_conversation_get_name(c))) && |
1338 account == gaim_conversation_get_account(c)) { | 1340 account == gaim_conversation_get_account(c)) { |
1339 | 1341 |
1340 break; | 1342 break; |
1341 } | 1343 } |
1342 | 1344 |
1837 | 1839 |
1838 if (!(flags & GAIM_MESSAGE_WHISPER)) { | 1840 if (!(flags & GAIM_MESSAGE_WHISPER)) { |
1839 char *str; | 1841 char *str; |
1840 const char *disp; | 1842 const char *disp; |
1841 | 1843 |
1842 str = g_strdup(gaim_normalize(who)); | 1844 str = g_strdup(gaim_normalize(account, who)); |
1843 disp = gaim_connection_get_display_name(gc); | 1845 disp = gaim_connection_get_display_name(gc); |
1844 | 1846 |
1845 if (!gaim_utf8_strcasecmp(str, gaim_normalize(gaim_account_get_username(account))) || | 1847 if (!gaim_utf8_strcasecmp(str, gaim_normalize(account, gaim_account_get_username(account))) || |
1846 (disp && !gaim_utf8_strcasecmp(str, gaim_normalize(disp)))) { | 1848 (disp && !gaim_utf8_strcasecmp(str, gaim_normalize(account, disp)))) { |
1847 | 1849 |
1848 flags |= GAIM_MESSAGE_SEND; | 1850 flags |= GAIM_MESSAGE_SEND; |
1849 } | 1851 } |
1850 else { | 1852 else { |
1851 flags |= GAIM_MESSAGE_RECV; | 1853 flags |= GAIM_MESSAGE_RECV; |