comparison src/blist.c @ 10349:655c48791b3c

[gaim-migrate @ 11563] Removed "Use remote alias when no alias is set" Defaulted to: Conversation titles: No Conversation messages: Yes Buddy list: Yes I barely use MSN, and I use ICQ even less, so if someone thinks of better defaults let me know. These seem to be the best for me. The trick is that on MSN, the server alias usually is less helpful than the screenname and on ICQ, it's more helpful. An alternative is to have the prpl specify which to use, but that's dumb. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 13 Dec 2004 00:52:07 +0000
parents ee4f477fc8cf
children ffb5f76d6188
comparison
equal deleted inserted replaced
10348:64bc206c7473 10349:655c48791b3c
1429 /* The contact alias */ 1429 /* The contact alias */
1430 c = gaim_buddy_get_contact(buddy); 1430 c = gaim_buddy_get_contact(buddy);
1431 if ((c != NULL) && (c->alias != NULL)) 1431 if ((c != NULL) && (c->alias != NULL))
1432 return c->alias; 1432 return c->alias;
1433 1433
1434 /* The server alias */
1435 if ((buddy->server_alias) && (*buddy->server_alias))
1436 return buddy->server_alias;
1437
1438 /* The buddy's user name (i.e. no alias) */
1439 return buddy->name;
1440 }
1441
1442
1443 const char *gaim_buddy_get_alias(GaimBuddy *buddy)
1444 {
1445 g_return_val_if_fail(buddy != NULL, NULL);
1446
1447 /* Search for an alias for the buddy. In order of precedence: */
1448 /* The buddy alias */
1449 if (buddy->alias != NULL)
1450 return buddy->alias;
1451
1434 /* The server alias, if preferences say so */ 1452 /* The server alias, if preferences say so */
1435 if ((buddy->server_alias) && (*buddy->server_alias) && 1453 if ((buddy->server_alias) && (*buddy->server_alias) &&
1436 (gaim_prefs_get_bool("/core/buddies/use_server_alias"))) 1454 (gaim_prefs_get_bool("/core/buddies/use_server_alias")))
1437 return buddy->server_alias; 1455 return buddy->server_alias;
1438 1456
1439 /* The buddy's user name (i.e. no alias) */ 1457 /* The buddy's user name (i.e. no alias) */
1440 return buddy->name; 1458 return buddy->name;
1441 } 1459 }
1442 1460
1443 1461 const char *gaim_buddy_get_local_alias(GaimBuddy *buddy)
1444 const char *gaim_buddy_get_alias(GaimBuddy *buddy) 1462 {
1445 { 1463 GaimContact *c;
1464
1446 g_return_val_if_fail(buddy != NULL, NULL); 1465 g_return_val_if_fail(buddy != NULL, NULL);
1447 1466
1448 /* Search for an alias for the buddy. In order of precedence: */ 1467 /* Search for an alias for the buddy. In order of precedence: */
1449 /* The buddy alias */ 1468 /* The buddy alias */
1450 if (buddy->alias != NULL) 1469 if (buddy->alias != NULL)
1451 return buddy->alias; 1470 return buddy->alias;
1452 1471
1453 /* The server alias, if preferences say so */ 1472 /* The contact alias */
1454 if ((buddy->server_alias) && (*buddy->server_alias) && 1473 c = gaim_buddy_get_contact(buddy);
1455 (gaim_prefs_get_bool("/core/buddies/use_server_alias"))) 1474 if ((c != NULL) && (c->alias != NULL))
1456 return buddy->server_alias; 1475 return c->alias;
1457 1476
1458 /* The buddy's user name (i.e. no alias) */ 1477 /* The buddy's user name (i.e. no alias) */
1459 return buddy->name; 1478 return buddy->name;
1460 } 1479 }
1461
1462 1480
1463 const char *gaim_chat_get_name(GaimChat *chat) 1481 const char *gaim_chat_get_name(GaimChat *chat)
1464 { 1482 {
1465 struct proto_chat_entry *pce; 1483 struct proto_chat_entry *pce;
1466 GList *parts, *tmp; 1484 GList *parts, *tmp;