changeset 28606:a5ddf6a99bfa

Destroy the menu-actions created by plugins for the context menus.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 20 Nov 2009 21:49:36 +0000
parents 1a349e6a27da
children ed0c4defd3dd
files finch/gntblist.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntblist.c	Fri Nov 20 21:48:29 2009 +0000
+++ b/finch/gntblist.c	Fri Nov 20 21:49:36 2009 +0000
@@ -1119,6 +1119,8 @@
 		PurpleMenuAction *act = (PurpleMenuAction *) list->data;
 		act->data = node;
 		gnt_append_menu_action(menu, act, NULL);
+		g_signal_connect_swapped(G_OBJECT(menu), "destroy",
+			G_CALLBACK(purple_menu_action_free), act);
 	}
 }
 
@@ -1368,6 +1370,8 @@
 			iter; iter = g_list_delete_link(iter, iter))
 	{
 		gnt_append_menu_action(menu, iter->data, NULL);
+		g_signal_connect_swapped(G_OBJECT(menu), "destroy",
+				G_CALLBACK(purple_menu_action_free), iter->data);
 	}
 }