Mercurial > pidgin.yaz
changeset 9918:c203312d8224
[gaim-migrate @ 10810]
(21:52:28) noif: LSchiere: now that datallah's patch is applied, I've got
another that uses the prpl method he added. This makes the add/remove
button on chats update properly when a chat is added or removed from the
list:
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 31 Aug 2004 01:58:52 +0000 |
parents | e74eb0d11f86 |
children | 1806abd8ccbc |
files | src/gtkblist.c src/gtkdialogs.c |
diffstat | 2 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkblist.c Tue Aug 31 01:45:12 2004 +0000 +++ b/src/gtkblist.c Tue Aug 31 01:58:52 2004 +0000 @@ -4112,6 +4112,8 @@ GaimChat *chat; GaimGroup *group; const char *group_name; + char *chat_name = NULL; + GaimConversation *conv = NULL; components = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); @@ -4148,6 +4150,18 @@ if (chat != NULL) { gaim_blist_add_chat(chat, group, NULL); + + if (GAIM_PLUGIN_PROTOCOL_INFO(data->account->gc->prpl)->get_chat_name != NULL) + chat_name = GAIM_PLUGIN_PROTOCOL_INFO( + data->account->gc->prpl)->get_chat_name(chat->components); + + if (chat_name != NULL) { + conv = gaim_find_conversation_with_account(chat_name, data->account); + g_free(chat_name); + } + + if (conv != NULL) + gaim_conversation_update(conv, GAIM_CONV_UPDATE_ADD); } gtk_widget_destroy(data->window);
--- a/src/gtkdialogs.c Tue Aug 31 01:45:12 2004 +0000 +++ b/src/gtkdialogs.c Tue Aug 31 01:58:52 2004 +0000 @@ -865,7 +865,21 @@ static void gaim_gtkdialogs_remove_chat_cb(GaimChat *chat) { + char *name = NULL; + GaimConversation *conv = NULL; + + if (GAIM_PLUGIN_PROTOCOL_INFO(chat->account->gc->prpl)->get_chat_name != NULL) + name = GAIM_PLUGIN_PROTOCOL_INFO(chat->account->gc->prpl)->get_chat_name(chat->components); + gaim_blist_remove_chat(chat); + + if (name != NULL) { + conv = gaim_find_conversation_with_account(name, chat->account); + g_free(name); + } + + if (conv != NULL) + gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); } void