# HG changeset patch # User Sean Egan # Date 1130058346 0 # Node ID dd7e9ef6339fcc08b53df401b1ee2e9e83a66b93 # Parent 628dd7aa6509101171a456455a67da85cd04290d [gaim-migrate @ 14036] Segfault on exit fix. The protocol actions code is hacky, and I'm not convinced I put it in them in the right place. Someone should fuss with it. committer: Tailor Script diff -r 628dd7aa6509 -r dd7e9ef6339f src/gtkblist.c --- a/src/gtkblist.c Sun Oct 23 08:56:39 2005 +0000 +++ b/src/gtkblist.c Sun Oct 23 09:05:46 2005 +0000 @@ -4944,9 +4944,13 @@ action->context = context; menuitem = gtk_menu_item_new_with_label(action->label); - plugin_menu_items = g_list_append(plugin_menu_items, menuitem); - plugin_menu_index++; - gtk_menu_shell_insert(GTK_MENU_SHELL(menu), menuitem, plugin_menu_index); + if (context) { + gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); + } else { + plugin_menu_items = g_list_append(plugin_menu_items, menuitem); + plugin_menu_index++; + gtk_menu_shell_insert(GTK_MENU_SHELL(menu), menuitem, plugin_menu_index); + } g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(plugin_act), action); g_object_set_data(G_OBJECT(menuitem), "plugin_action", action);