src/gtkblist.c

changeset 11745
3168e9db2be6
parent 11742
ddba58b25836
child 11768
b45e26d7a4c9
--- 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);

mercurial