From b809cf62aed2f91ef87c58525053558b29f06ff4 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 8 Jul 2015 18:18:43 +0200 Subject: Windows: Disable Set Key Header Algorithm item in "Volumes" menu when the system partition is selected by the user using "Select Device" --- src/Mount/Mount.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Mount') diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index a345e189..cfe3003b 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -7649,6 +7649,20 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa EndMainDlg (hwndDlg); return 1; + case WM_INITMENUPOPUP: + { + // disable "Set Header Key Derivation Algorithm" entry in "Volumes" menu + // "Volumes" menu is the first (index 0) submenu of the main menu + if ((HMENU) wParam == GetSubMenu (GetMenu (hwndDlg), 0)) + { + if (ActiveSysEncDeviceSelected ()) + EnableMenuItem (GetMenu (hwndDlg), IDM_CHANGE_HEADER_KEY_DERIV_ALGO, MF_GRAYED); + else + EnableMenuItem (GetMenu (hwndDlg), IDM_CHANGE_HEADER_KEY_DERIV_ALGO, MF_ENABLED); + } + } + return 1; + default: // Recreate tray icon if Explorer restarted if (taskBarCreatedMsg != 0 && uMsg == taskBarCreatedMsg && TaskBarIconMutex != NULL) -- cgit v1.2.3