To: vim-dev@vim.org Subject: patch 5.4.x4 Fcc: outbox From: Bram Moolenaar ------------ Since nobody came with a solution, I tried solving it myself. Are all Win32 developers on holidays? Fortunately I could guess what the problem was: It was attempted to remove the PopUp menu item from the menu bar, while popup menu items are on a completely separate menu. Patch 5.4.x4 Problem: Win32 GUI: Removing an item from the popup menu doesn't work. Solution: Don't remove the item from the menubar, but from the parent popup menu. Files: src/gui_w32.c *** ../vim-5.4.30/src/gui_w32.c Fri Aug 13 13:05:50 1999 --- src/gui_w32.c Tue Aug 17 12:25:52 1999 *************** *** 4177,4183 **** else #endif { ! RemoveMenu(s_menuBar, menu->id, MF_BYCOMMAND); if (menu->submenu_id != NULL) DestroyMenu(menu->submenu_id); if (IsWindow(menu->tearoff_handle)) --- 4177,4188 ---- else #endif { ! if (menu->parent != NULL ! && popup_menu(menu->parent->dname) ! && menu->parent->submenu_id != NULL) ! RemoveMenu(menu->parent->submenu_id, menu->id, MF_BYCOMMAND); ! else ! RemoveMenu(s_menuBar, menu->id, MF_BYCOMMAND); if (menu->submenu_id != NULL) DestroyMenu(menu->submenu_id); if (IsWindow(menu->tearoff_handle)) -- Corduroy pillows: They're making headlines! --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /