# HG changeset patch # User Luke Schierer # Date 1093917532 0 # Node ID c203312d822402e06fa12b5d864d8d10d4208034 # Parent e74eb0d11f8600e577a1354756663421718b9462 [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 diff -r e74eb0d11f86 -r c203312d8224 src/gtkblist.c --- 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); diff -r e74eb0d11f86 -r c203312d8224 src/gtkdialogs.c --- 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