# HG changeset patch # User Daniel Atallah # Date 1131504862 0 # Node ID 014c22dd9d06b3931e5147e41834162083990c08 # Parent 2b6e0be024fb4147f5aea2ae027e19481a88377d [gaim-migrate @ 14311] Yet another docklet related patch from charkins. This one fixes the docklet flashing to stop if you close the conv. w/o reading the message. This changes the behavior of the "deleting-conversation" signal slightly - the conv. is removed from the conversations and ims or chats lists before emission instead of after. This is a wee bit strange, but doesn't seem like it'll have any ill effects. committer: Tailor Script diff -r 2b6e0be024fb -r 014c22dd9d06 plugins/docklet/docklet.c --- a/plugins/docklet/docklet.c Wed Nov 09 02:37:48 2005 +0000 +++ b/plugins/docklet/docklet.c Wed Nov 09 02:54:22 2005 +0000 @@ -445,6 +445,8 @@ plugin, GAIM_CALLBACK(docklet_update_status_cb), NULL); gaim_signal_connect(conv_handle, "conversation-created", plugin, GAIM_CALLBACK(docklet_update_status_cb), NULL); + gaim_signal_connect(conv_handle, "deleting-conversation", + plugin, GAIM_CALLBACK(docklet_update_status_cb), NULL); gaim_signal_connect(conv_handle, "conversation-updated", plugin, GAIM_CALLBACK(docklet_conv_updated_cb), NULL); diff -r 2b6e0be024fb -r 014c22dd9d06 src/conversation.c --- a/src/conversation.c Wed Nov 09 02:37:48 2005 +0000 +++ b/src/conversation.c Wed Nov 09 02:54:22 2005 +0000 @@ -452,6 +452,14 @@ } } + /* remove from conversations and im/chats lists prior to emit */ + conversations = g_list_remove(conversations, conv); + + if(conv->type==GAIM_CONV_TYPE_IM) + ims = g_list_remove(ims, conv); + else if(conv->type==GAIM_CONV_TYPE_CHAT) + chats = g_list_remove(chats, conv); + gaim_signal_emit(gaim_conversations_get_handle(), "deleting-conversation", conv); @@ -472,8 +480,6 @@ g_list_free(g_list_first(conv->send_history)); - conversations = g_list_remove(conversations, conv); - if (conv->type == GAIM_CONV_TYPE_IM) { gaim_conv_im_stop_typing_timeout(conv->u.im); gaim_conv_im_stop_type_again_timeout(conv->u.im); @@ -485,8 +491,6 @@ GAIM_DBUS_UNREGISTER_POINTER(conv->u.im); g_free(conv->u.im); conv->u.im = NULL; - - ims = g_list_remove(ims, conv); } else if (conv->type == GAIM_CONV_TYPE_CHAT) { @@ -522,8 +526,6 @@ GAIM_DBUS_UNREGISTER_POINTER(conv->u.chat); g_free(conv->u.chat); conv->u.chat = NULL; - - chats = g_list_remove(chats, conv); } g_hash_table_destroy(conv->data);