Mercurial > pidgin
diff src/conversation.c @ 8015:5f86d21b6232
[gaim-migrate @ 8695]
chat aliases in tabs/titles (like the add/remove button, these don't update when they should)
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Mon, 05 Jan 2004 22:09:29 +0000 |
parents | 746404b12236 |
children | fa6395637e2c |
line wrap: on
line diff
--- a/src/conversation.c Mon Jan 05 20:51:37 2004 +0000 +++ b/src/conversation.c Mon Jan 05 22:09:29 2004 +0000 @@ -1085,19 +1085,25 @@ { GaimAccount *account; GaimBuddy *b; - const char *text, *name; + GaimChat *chat; + const char *text = NULL, *name; g_return_if_fail(conv != NULL); account = gaim_conversation_get_account(conv); name = gaim_conversation_get_name(conv); - if (gaim_prefs_get_bool("/core/conversations/use_alias_for_title") && - account != NULL && ((b = gaim_find_buddy(account, name)) != NULL)) { - - text = gaim_get_buddy_alias(b); + if (gaim_prefs_get_bool("/core/conversations/use_alias_for_title")) { + if(gaim_conversation_get_type(conv) == GAIM_CONV_IM) { + if(account && ((b = gaim_find_buddy(account, name)) != NULL)) + text = gaim_get_buddy_alias(b); + } else if(gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { + if(account && ((chat = gaim_blist_find_chat(account, name)) != NULL)) + text = chat->alias; + } } - else + + if(!text) text = name; gaim_conversation_set_title(conv, text);