comparison src/conversation.c @ 9620:c001be3c330e

[gaim-migrate @ 10464] Changes to those get_alias functions in blist.c from Christopher (siege) O'Brien: Renames gaim_get_buddy_alias to gaim_buddy_get_alias Renames gaim_get_buddy_alias_only to _gaim_buddy_get_alias_only Adds function gaim_buddy_get_contact_alias, which looks up a buddy's appropriate display name by order of: buddy alias; contact alias; server alias; buddy name. Note that the buddy alias is still the top-priority. Changed conversation.c to use _get_contact_alias rather than _get_alias The end result of this is that aliasing the contact will result in conversations with any of that contact's buddies using the contact alias. This allows people like myself to no longer have to alias each buddy to the same alias in order to achieve the same effect. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 31 Jul 2004 21:29:40 +0000
parents c35c6b56a35f
children 8a540b8a5f70
comparison
equal deleted inserted replaced
9619:da88e2cd5c53 9620:c001be3c330e
1098 name = gaim_conversation_get_name(conv); 1098 name = gaim_conversation_get_name(conv);
1099 1099
1100 if (gaim_prefs_get_bool("/core/conversations/use_alias_for_title")) { 1100 if (gaim_prefs_get_bool("/core/conversations/use_alias_for_title")) {
1101 if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) { 1101 if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) {
1102 if(account && ((b = gaim_find_buddy(account, name)) != NULL)) 1102 if(account && ((b = gaim_find_buddy(account, name)) != NULL))
1103 text = gaim_get_buddy_alias(b); 1103 text = gaim_buddy_get_contact_alias(b);
1104 } else if(gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { 1104 } else if(gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) {
1105 if(account && ((chat = gaim_blist_find_chat(account, name)) != NULL)) 1105 if(account && ((chat = gaim_blist_find_chat(account, name)) != NULL))
1106 text = chat->alias; 1106 text = chat->alias;
1107 } 1107 }
1108 } 1108 }
1387 b = gaim_find_buddy(account, 1387 b = gaim_find_buddy(account,
1388 gaim_account_get_username(account)); 1388 gaim_account_get_username(account));
1389 1389
1390 if (gaim_account_get_alias(account) != NULL) 1390 if (gaim_account_get_alias(account) != NULL)
1391 who = account->alias; 1391 who = account->alias;
1392 else if (b != NULL && strcmp(b->name, gaim_get_buddy_alias(b))) 1392 else if (b != NULL && strcmp(b->name, gaim_buddy_get_contact_alias(b)))
1393 who = gaim_get_buddy_alias(b); 1393 who = gaim_buddy_get_contact_alias(b);
1394 else if (gaim_connection_get_display_name(gc) != NULL) 1394 else if (gaim_connection_get_display_name(gc) != NULL)
1395 who = gaim_connection_get_display_name(gc); 1395 who = gaim_connection_get_display_name(gc);
1396 else 1396 else
1397 who = gaim_account_get_username(account); 1397 who = gaim_account_get_username(account);
1398 } 1398 }
1399 else { 1399 else {
1400 b = gaim_find_buddy(account, 1400 b = gaim_find_buddy(account,
1401 gaim_conversation_get_name(conv)); 1401 gaim_conversation_get_name(conv));
1402 1402
1403 if (b != NULL) 1403 if (b != NULL)
1404 who = gaim_get_buddy_alias(b); 1404 who = gaim_buddy_get_contact_alias(b);
1405 else 1405 else
1406 who = gaim_conversation_get_name(conv); 1406 who = gaim_conversation_get_name(conv);
1407 } 1407 }
1408 } 1408 }
1409 else { 1409 else {
1410 b = gaim_find_buddy(account, who); 1410 b = gaim_find_buddy(account, who);
1411 1411
1412 if (b != NULL) 1412 if (b != NULL)
1413 who = gaim_get_buddy_alias(b); 1413 who = gaim_buddy_get_contact_alias(b);
1414 } 1414 }
1415 } 1415 }
1416 } 1416 }
1417 1417
1418 if (gaim_conversation_is_logging(conv)) 1418 if (gaim_conversation_is_logging(conv))