diff gtk/gtkblist.c @ 14996:0d9f69b23352

[gaim-migrate @ 17774] The data for "plugin_action" is set with a destructor function. So freeing it twice would cause a crash. The reason it's not crashing is, the children of the container are not the menuitems, but GtkAccelLabel (or some such thing). So all we are doing is freeing null. Also, when the menu is destroyed, all the menuitems are also destroyed anyway. So get rid of the unrequired loop. Also, isdigit expects a character, not a string. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 18 Nov 2006 05:30:57 +0000
parents 8d3a5ff15f05
children 33ac3c591b4a
line wrap: on
line diff
--- a/gtk/gtkblist.c	Sat Nov 18 05:25:31 2006 +0000
+++ b/gtk/gtkblist.c	Sat Nov 18 05:30:57 2006 +0000
@@ -6115,20 +6115,7 @@
 
 	/* Remove old plugin action submenus from the Tools menu */
 	for (l = plugin_submenus; l; l = l->next)
-	{
-		GList *menuitems;
-
-		submenu = l->data;
-
-		while ((menuitems = gtk_container_get_children(GTK_CONTAINER(submenu))) != NULL)
-		{
-			menuitem = menuitems->data;
-			g_free(g_object_get_data(G_OBJECT(menuitem), "plugin_action"));
-			gtk_widget_destroy(menuitem);
-		}
-
-		gtk_widget_destroy(GTK_WIDGET(submenu));
-	}
+		gtk_widget_destroy(GTK_WIDGET(l->data));
 	g_list_free(plugin_submenus);
 	plugin_submenus = NULL;