Mercurial > pidgin.yaz
comparison pidgin/gtkconv.c @ 18305:ffd706ec0220
Set and use convchatbuddy->buddy.
This change also makes sure we don't leak everytime any user in a chatroom
changes nick.
Thanks to stingray for noticing this. Fixes #1818.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 27 Jun 2007 09:15:57 +0000 |
parents | 0d948cac4afa |
children | a3469318cf35 |
comparison
equal
deleted
inserted
replaced
18304:38ecbc8a70bd | 18305:ffd706ec0220 |
---|---|
3682 pixbuf = get_chat_buddy_status_icon(chat, name, flags); | 3682 pixbuf = get_chat_buddy_status_icon(chat, name, flags); |
3683 | 3683 |
3684 if (!strcmp(chat->nick, purple_normalize(conv->account, old_name != NULL ? old_name : name))) | 3684 if (!strcmp(chat->nick, purple_normalize(conv->account, old_name != NULL ? old_name : name))) |
3685 is_me = TRUE; | 3685 is_me = TRUE; |
3686 | 3686 |
3687 is_buddy = (purple_find_buddy(conv->account, name) != NULL); | 3687 is_buddy = cb->buddy; |
3688 | 3688 |
3689 tmp = g_utf8_casefold(alias, -1); | 3689 tmp = g_utf8_casefold(alias, -1); |
3690 alias_key = g_utf8_collate_key(tmp, -1); | 3690 alias_key = g_utf8_collate_key(tmp, -1); |
3691 g_free(tmp); | 3691 g_free(tmp); |
3692 | 3692 |
5574 if (!purple_conv_chat_find_user(chat, old_name)) | 5574 if (!purple_conv_chat_find_user(chat, old_name)) |
5575 return; | 5575 return; |
5576 | 5576 |
5577 g_return_if_fail(new_alias != NULL); | 5577 g_return_if_fail(new_alias != NULL); |
5578 | 5578 |
5579 cbuddy = purple_conv_chat_cb_new(new_name, new_alias, flags); | 5579 cbuddy = purple_conv_chat_cb_find(chat, new_name); |
5580 | 5580 |
5581 add_chat_buddy_common(conv, cbuddy, old_name); | 5581 add_chat_buddy_common(conv, cbuddy, old_name); |
5582 } | 5582 } |
5583 | 5583 |
5584 static void | 5584 static void |