From 97e6398803fd17e55377e06199554c28b1448a48 Mon Sep 17 00:00:00 2001 From: rdipardo <59004801+rdipardo@users.noreply.github.com> Date: Thu, 24 Oct 2024 18:05:21 -0400 Subject: [PATCH] Prevent empty menu slots from being wrongly enabled --- Legacy-v2.1/Src/NotepadPP.ob2 | 4 ++-- Legacy-v2.1/Src/NotepadPPU.ob2 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Legacy-v2.1/Src/NotepadPP.ob2 b/Legacy-v2.1/Src/NotepadPP.ob2 index 3fc45dd..d72ff4a 100644 --- a/Legacy-v2.1/Src/NotepadPP.ob2 +++ b/Legacy-v2.1/Src/NotepadPP.ob2 @@ -215,7 +215,7 @@ BEGIN IF enable THEN Win.EnableMenuItem (hMenu, MI [index].cmdID, Win.MF_BYCOMMAND + Win.MF_ENABLED) ELSE - Win.EnableMenuItem (hMenu, MI [index].cmdID, Win.MF_BYCOMMAND + Win.MF_GRAYED) + Win.EnableMenuItem (hMenu, MI [index].cmdID, Win.MF_BYCOMMAND + Win.MF_GRAYED + Win.MF_DISABLED) END; ELSE menuItemInfo [index].enabled := enable @@ -306,7 +306,7 @@ BEGIN Win.CheckMenuItem (hMenu, cmdID, Win.MF_BYCOMMAND + Win.MF_CHECKED); END; IF ~menuItemInfo [i].enabled THEN - Win.EnableMenuItem (hMenu, cmdID, Win.MF_BYCOMMAND + Win.MF_GRAYED) + Win.EnableMenuItem (hMenu, cmdID, Win.MF_BYCOMMAND + Win.MF_GRAYED + Win.MF_DISABLED) END; INC (i) END; diff --git a/Legacy-v2.1/Src/NotepadPPU.ob2 b/Legacy-v2.1/Src/NotepadPPU.ob2 index 25b45c1..fb1976d 100644 --- a/Legacy-v2.1/Src/NotepadPPU.ob2 +++ b/Legacy-v2.1/Src/NotepadPPU.ob2 @@ -215,7 +215,7 @@ BEGIN IF enable THEN Win.EnableMenuItem (hMenu, MI [index].cmdID, Win.MF_BYCOMMAND + Win.MF_ENABLED) ELSE - Win.EnableMenuItem (hMenu, MI [index].cmdID, Win.MF_BYCOMMAND + Win.MF_GRAYED) + Win.EnableMenuItem (hMenu, MI [index].cmdID, Win.MF_BYCOMMAND + Win.MF_GRAYED + Win.MF_DISABLED) END; ELSE menuItemInfo [index].enabled := enable @@ -308,7 +308,7 @@ BEGIN Win.CheckMenuItem (hMenu, cmdID, Win.MF_BYCOMMAND + Win.MF_CHECKED); END; IF ~menuItemInfo [i].enabled THEN - Win.EnableMenuItem (hMenu, cmdID, Win.MF_BYCOMMAND + Win.MF_GRAYED) + Win.EnableMenuItem (hMenu, cmdID, Win.MF_BYCOMMAND + Win.MF_GRAYED + Win.MF_DISABLED) END; INC (i) END;