Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
14995:5d71039b20eb | 14996:0d9f69b23352 |
---|---|
6113 | 6113 |
6114 g_return_if_fail(pluginmenu != NULL); | 6114 g_return_if_fail(pluginmenu != NULL); |
6115 | 6115 |
6116 /* Remove old plugin action submenus from the Tools menu */ | 6116 /* Remove old plugin action submenus from the Tools menu */ |
6117 for (l = plugin_submenus; l; l = l->next) | 6117 for (l = plugin_submenus; l; l = l->next) |
6118 { | 6118 gtk_widget_destroy(GTK_WIDGET(l->data)); |
6119 GList *menuitems; | |
6120 | |
6121 submenu = l->data; | |
6122 | |
6123 while ((menuitems = gtk_container_get_children(GTK_CONTAINER(submenu))) != NULL) | |
6124 { | |
6125 menuitem = menuitems->data; | |
6126 g_free(g_object_get_data(G_OBJECT(menuitem), "plugin_action")); | |
6127 gtk_widget_destroy(menuitem); | |
6128 } | |
6129 | |
6130 gtk_widget_destroy(GTK_WIDGET(submenu)); | |
6131 } | |
6132 g_list_free(plugin_submenus); | 6119 g_list_free(plugin_submenus); |
6133 plugin_submenus = NULL; | 6120 plugin_submenus = NULL; |
6134 | 6121 |
6135 accel_group = gtk_menu_get_accel_group(GTK_MENU(pluginmenu)); | 6122 accel_group = gtk_menu_get_accel_group(GTK_MENU(pluginmenu)); |
6136 | 6123 |