changeset 14995: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 5d71039b20eb
children 33ac3c591b4a
files gtk/gtkblist.c gtk/gtkmain.c
diffstat 2 files changed, 2 insertions(+), 15 deletions(-) [+]
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;
 
--- a/gtk/gtkmain.c	Sat Nov 18 05:25:31 2006 +0000
+++ b/gtk/gtkmain.c	Sat Nov 18 05:30:57 2006 +0000
@@ -735,7 +735,7 @@
 	for (accounts = gaim_accounts_get_all(); accounts != NULL; accounts = accounts->next) {
 		GaimAccount *account = accounts->data;
 		if (!strcmp(gaim_account_get_protocol_id(account), "prpl-oscar")) {
-			if (isdigit(gaim_account_get_username(account)))
+			if (isdigit(*gaim_account_get_username(account)))
 				gaim_account_set_protocol_id(account, "prpl-icq");
 			else 
 				gaim_account_set_protocol_id(account, "prpl-aim");