=== modified file 'debian/changelog' --- debian/changelog 2009-03-19 01:48:09 +0000 +++ debian/changelog 2009-03-20 03:45:13 +0000 @@ -1,3 +1,12 @@ +pidgin-libnotify (0.14-1ubuntu7) jaunty; urgency=low + + * /debian/patches/indicate.patch: Making it so that there is + also a function watching for destroyed conversations and + destroying the indicators if they're left on the conversations. + This fixes LP: #340717 + + -- Ted Gould Thu, 19 Mar 2009 22:39:59 -0500 + pidgin-libnotify (0.14-1ubuntu6) jaunty; urgency=low * /debian/patches/indicate.patch: === modified file 'debian/patches/indicate.patch' --- debian/patches/indicate.patch 2009-03-19 01:51:48 +0000 +++ debian/patches/indicate.patch 2009-03-20 03:38:20 +0000 @@ -41,7 +41,7 @@ === modified file 'src/pidgin-libnotify.c' --- old/src/pidgin-libnotify.c 2009-01-31 14:57:15 +0000 -+++ new/src/pidgin-libnotify.c 2009-03-19 01:50:59 +0000 ++++ new/src/pidgin-libnotify.c 2009-03-20 02:35:20 +0000 @@ -35,15 +35,31 @@ /* for pidgin_create_prpl_icon */ @@ -368,7 +368,7 @@ } static void -@@ -463,10 +544,285 @@ +@@ -463,10 +544,305 @@ if (nick && !strcmp (sender, nick)) return; @@ -486,6 +486,26 @@ +} + +static void ++conv_delete_cb (PurpleConversation * conv, void * data) ++{ ++ g_debug("Pidgin conv delete: %s", purple_conversation_get_name(conv)); ++ IndicateIndicator * indicator = INDICATE_INDICATOR(purple_conversation_get_data(conv, "indicate-indicator")); ++ if (indicator != NULL) { ++ indicate_indicator_hide(indicator); ++ g_object_unref(G_OBJECT(indicator)); ++ purple_conversation_set_data(conv, "indicate-indicator", NULL); ++ } ++ ++ PidginConversation * pconv = PIDGIN_CONVERSATION(conv); ++ if (pconv != NULL) { ++ g_signal_handlers_disconnect_by_func(G_OBJECT(pconv->entry), G_CALLBACK(indicate_focus_cb), conv); ++ g_signal_handlers_disconnect_by_func(G_OBJECT(pconv->imhtml), G_CALLBACK(indicate_focus_cb), conv); ++ } ++ ++ return; ++} ++ ++static void +indicate_chat_nick (PurpleAccount *account, + const gchar *sender, + const gchar *message, @@ -658,7 +678,7 @@ } static gboolean -@@ -479,6 +835,14 @@ +@@ -479,6 +855,14 @@ return FALSE; } @@ -673,7 +693,7 @@ conv_handle = purple_conversations_get_handle (); blist_handle = purple_blist_get_handle (); conn_handle = purple_connections_get_handle(); -@@ -497,6 +861,12 @@ +@@ -497,6 +881,15 @@ purple_signal_connect (conv_handle, "received-chat-msg", plugin, PURPLE_CALLBACK(notify_chat_nick), NULL); @@ -683,10 +703,13 @@ + purple_signal_connect (conv_handle, "received-chat-msg", plugin, + PURPLE_CALLBACK(indicate_chat_nick), NULL); + ++ purple_signal_connect (conv_handle, "deleting-conversation", plugin, ++ PURPLE_CALLBACK(conv_delete_cb), NULL); ++ /* used just to not display the flood of guifications we'd get */ purple_signal_connect (conn_handle, "signed-on", plugin, PURPLE_CALLBACK(event_connection_throttle), NULL); -@@ -525,6 +895,12 @@ +@@ -525,6 +918,15 @@ purple_signal_disconnect (conv_handle, "received-chat-msg", plugin, PURPLE_CALLBACK(notify_chat_nick)); @@ -696,10 +719,13 @@ + purple_signal_disconnect (conv_handle, "received-chat-msg", plugin, + PURPLE_CALLBACK(indicate_chat_nick)); + ++ purple_signal_disconnect (conv_handle, "deleting-conversation", plugin, ++ PURPLE_CALLBACK(conv_delete_cb)); ++ purple_signal_disconnect (conn_handle, "signed-on", plugin, PURPLE_CALLBACK(event_connection_throttle)); -@@ -532,6 +908,14 @@ +@@ -532,6 +934,14 @@ notify_uninit ();