]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Oops. Since r6546, old "Special Commands" menus weren't being deleted from the
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Fri, 10 Feb 2006 20:57:40 +0000 (20:57 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Fri, 10 Feb 2006 20:57:40 +0000 (20:57 +0000)
context menu, and they tended to pile up.

[originally from svn r6547]
[r6546 == 3cdf5b739f00445f7eef721fab6e321c19f2016f]

windows/window.c

index 214866a8ffef390fd850f27683157474c016c95a..aa805d23836e2c4782836ad4a57ef304bcff2997 100644 (file)
@@ -968,15 +968,15 @@ void update_specials_menu(void *frontend)
            DeleteMenu(popup_menus[j].menu, specials_menu, MF_BYCOMMAND);
            DeleteMenu(popup_menus[j].menu, IDM_SPECIALSEP, MF_BYCOMMAND);
        }
-       if (specials) {
+       if (new_menu) {
            InsertMenu(popup_menus[j].menu, IDM_SHOWLOG,
                       MF_BYCOMMAND | MF_POPUP | MF_ENABLED,
                       (UINT) new_menu, "S&pecial Command");
            InsertMenu(popup_menus[j].menu, IDM_SHOWLOG,
                       MF_BYCOMMAND | MF_SEPARATOR, IDM_SPECIALSEP, 0);
        }
-       specials_menu = new_menu;
     }
+    specials_menu = new_menu;
 }
 
 static void update_mouse_pointer(void)