diff options
Diffstat (limited to 'src/Mount/Mount.c')
-rw-r--r-- | src/Mount/Mount.c | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 212a5d39..3213a693 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -1953,6 +1953,7 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_NEW_PIM_ENABLE), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_ENABLE_NEW_KEYFILES), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_SHOW_PASSWORD_CHPWD_NEW), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_NEW_KEYFILES), FALSE);
@@ -1969,6 +1970,7 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_NEW_PIM_ENABLE), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_SHOW_PASSWORD_CHPWD_NEW), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDT_NEW_PASSWORD), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDT_CONFIRM_PASSWORD), FALSE);
@@ -1989,6 +1991,7 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_NEW_PIM_ENABLE), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_ENABLE_NEW_KEYFILES), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_SHOW_PASSWORD_CHPWD_NEW), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_NEW_KEYFILES), FALSE);
@@ -2182,6 +2185,37 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR return 1;
}
+ if (lw == IDC_PIM_ENABLE)
+ {
+ ShowWindow (GetDlgItem (hwndDlg, IDC_PIM_ENABLE), SW_HIDE);
+ ShowWindow (GetDlgItem( hwndDlg, IDT_OLD_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_OLD_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_OLD_PIM_HELP), SW_SHOW);
+
+ // check also the "Use PIM" for the new password if it is enabled
+ if (IsWindowEnabled (GetDlgItem (hwndDlg, IDC_NEW_PIM_ENABLE)))
+ {
+ SetCheckBox (hwndDlg, IDC_NEW_PIM_ENABLE, TRUE);
+
+ ShowWindow (GetDlgItem (hwndDlg, IDC_NEW_PIM_ENABLE), SW_HIDE);
+ ShowWindow (GetDlgItem( hwndDlg, IDT_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM_HELP), SW_SHOW);
+ }
+
+ return 1;
+ }
+
+ if (lw == IDC_NEW_PIM_ENABLE)
+ {
+ ShowWindow (GetDlgItem (hwndDlg, IDC_NEW_PIM_ENABLE), SW_HIDE);
+ ShowWindow (GetDlgItem( hwndDlg, IDT_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM_HELP), SW_SHOW);
+
+ return 1;
+ }
+
if (lw == IDC_KEYFILES)
{
if (bSysEncPwdChangeDlgMode)
@@ -2546,6 +2580,16 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa SetPim (hwndDlg, IDC_PIM, *pim);
+ /* make PIM field visible if a PIM value has been explicitely specified */
+ if (*pim > 0)
+ {
+ SetCheckBox (hwndDlg, IDC_PIM_ENABLE, TRUE);
+ ShowWindow (GetDlgItem (hwndDlg, IDC_PIM_ENABLE), SW_HIDE);
+ ShowWindow (GetDlgItem( hwndDlg, IDT_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM_HELP), SW_SHOW);
+ }
+
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable);
mountOptions.PartitionInInactiveSysEncScope = bPrebootPasswordDlgMode;
@@ -2711,6 +2755,15 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa return 1;
}
+ if (lw == IDC_PIM_ENABLE)
+ {
+ ShowWindow (GetDlgItem (hwndDlg, IDC_PIM_ENABLE), SW_HIDE);
+ ShowWindow (GetDlgItem( hwndDlg, IDT_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM_HELP), SW_SHOW);
+ return 1;
+ }
+
if (lw == IDC_SHOW_PASSWORD)
{
SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD),
@@ -3173,6 +3226,7 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), protect);
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), protect);
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), protect);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_ENABLE), protect);
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE_HIDVOL_PROT, hidVolProtKeyFilesParam.EnableKeyFiles);
@@ -3183,6 +3237,16 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD_PROT_HIDVOL), (LPSTR) mountOptions->ProtectedHidVolPassword.Text);
SetPim (hwndDlg, IDC_PIM, mountOptions->ProtectedHidVolPim);
+
+ /* make PIM field visible if a PIM value has been explicitely specified */
+ if (mountOptions->ProtectedHidVolPim > 0)
+ {
+ SetCheckBox (hwndDlg, IDC_PIM_ENABLE, TRUE);
+ ShowWindow (GetDlgItem (hwndDlg, IDC_PIM_ENABLE), SW_HIDE);
+ ShowWindow (GetDlgItem( hwndDlg, IDT_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM_HELP), SW_SHOW);
+ }
ToHyperlink (hwndDlg, IDC_LINK_HIDVOL_PROTECTION_INFO);
@@ -3239,6 +3303,15 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM return 1;
}
+ if (lw == IDC_PIM_ENABLE)
+ {
+ ShowWindow (GetDlgItem (hwndDlg, IDC_PIM_ENABLE), SW_HIDE);
+ ShowWindow (GetDlgItem( hwndDlg, IDT_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM), SW_SHOW);
+ ShowWindow (GetDlgItem( hwndDlg, IDC_PIM_HELP), SW_SHOW);
+ return 1;
+ }
+
if (lw == IDC_LINK_HIDVOL_PROTECTION_INFO)
{
Applink ("hiddenvolprotection", TRUE, "");
@@ -3320,6 +3393,7 @@ BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM EnableWindow (GetDlgItem (hwndDlg, IDT_PIM), protect);
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM), protect);
EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_HELP), protect);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_PIM_ENABLE), protect);
return 1;
}
|