Mercurial > pidgin
changeset 7312:b8ce6e194cff
[gaim-migrate @ 7896]
Kevin Stange mentioned that we weren't using contact aliases right when sorting, so I fixinated it.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Wed, 22 Oct 2003 02:01:30 +0000 |
parents | 1c8830db0189 |
children | be7c1468c6a7 |
files | src/blist.c src/blist.h |
diffstat | 2 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/blist.c Tue Oct 21 17:41:57 2003 +0000 +++ b/src/blist.c Wed Oct 22 02:01:30 2003 +0000 @@ -106,7 +106,7 @@ } } -static GaimContact *gaim_buddy_get_contact(GaimBuddy *buddy) +GaimContact *gaim_buddy_get_contact(GaimBuddy *buddy) { return (GaimContact*)((GaimBlistNode*)buddy)->parent; } @@ -775,7 +775,13 @@ const char *gaim_contact_get_alias(GaimContact* contact) { - return contact ? contact->alias : NULL; + if(!contact) + return NULL; + + if(contact->alias) + return contact->alias; + + return gaim_get_buddy_alias(contact->priority); } GaimGroup *gaim_group_new(const char *name)
--- a/src/blist.h Tue Oct 21 17:41:57 2003 +0000 +++ b/src/blist.h Wed Oct 22 02:01:30 2003 +0000 @@ -378,6 +378,15 @@ GaimBuddyIcon *gaim_buddy_get_icon(const GaimBuddy *buddy); /** + * Returns a buddy's contact. + * + * @param buddy The buddy. + * + * @return The buddy's contact. + */ +GaimContact *gaim_buddy_get_contact(GaimBuddy *buddy); + +/** * Adds a new buddy to the buddy list. * * The buddy will be inserted right after node or prepended to the