VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format/Tcformat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Format/Tcformat.c')
-rw-r--r--src/Format/Tcformat.c54
1 files changed, 10 insertions, 44 deletions
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index 797198ac..2ebc70ca 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -714,33 +714,6 @@ static BOOL CreatingHiddenSysVol (void)
&& bHiddenVol && !bHiddenVolHost);
}
-static void ConfigReadCompareInt(char *configKey, int defaultValue, int* pOutputValue, BOOL bOnlyCheckModified, BOOL* pbModified)
-{
- int intValue = ConfigReadInt (configKey, defaultValue);
- if (pOutputValue)
- {
- if (pbModified && (*pOutputValue != intValue))
- *pbModified = TRUE;
- if (!bOnlyCheckModified)
- *pOutputValue = intValue;
- }
-}
-
-static void ConfigReadCompareString (char *configKey, char *defaultValue, char *str, int maxLen, BOOL bOnlyCheckModified, BOOL *pbModified)
-{
- char *strValue = (char*) malloc (maxLen);
- memcpy (strValue, str, maxLen);
-
- ConfigReadString (configKey, defaultValue, strValue, maxLen);
-
- if (pbModified && strcmp (str, strValue))
- *pbModified = TRUE;
- if (!bOnlyCheckModified)
- memcpy(str, strValue, maxLen);
-
- free (strValue);
-}
-
static void LoadSettingsAndCheckModified (HWND hwndDlg, BOOL bOnlyCheckModified, BOOL* pbSettingsModified, BOOL* pbHistoryModified)
{
if (!bOnlyCheckModified)
@@ -5436,16 +5409,13 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (lw == IDC_SHOW_PASSWORD && nCurPageNo == PASSWORD_PAGE)
{
- SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD),
- EM_SETPASSWORDCHAR,
- GetCheckBox (hwndDlg, IDC_SHOW_PASSWORD) ? 0 : '*',
- 0);
- SendMessage (GetDlgItem (hwndDlg, IDC_VERIFY),
- EM_SETPASSWORDCHAR,
- GetCheckBox (hwndDlg, IDC_SHOW_PASSWORD) ? 0 : '*',
- 0);
- InvalidateRect (GetDlgItem (hwndDlg, IDC_PASSWORD), NULL, TRUE);
- InvalidateRect (GetDlgItem (hwndDlg, IDC_VERIFY), NULL, TRUE);
+ HandleShowPasswordFieldAction (hwndDlg, IDC_SHOW_PASSWORD, IDC_PASSWORD, IDC_VERIFY);
+ return 1;
+ }
+
+ if (lw == IDC_SHOW_PIM && nCurPageNo == PIM_PAGE)
+ {
+ HandleShowPasswordFieldAction (hwndDlg, IDC_SHOW_PIM, IDC_PIM, 0);
return 1;
}
@@ -5536,11 +5506,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (lw == IDC_SHOW_PASSWORD_SINGLE)
{
- SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD_DIRECT),
- EM_SETPASSWORDCHAR,
- GetCheckBox (hwndDlg, IDC_SHOW_PASSWORD_SINGLE) ? 0 : '*',
- 0);
- InvalidateRect (GetDlgItem (hwndDlg, IDC_PASSWORD_DIRECT), NULL, TRUE);
+ HandleShowPasswordFieldAction (hwndDlg, IDC_SHOW_PASSWORD_SINGLE, IDC_PASSWORD_DIRECT, IDC_PIM);
return 1;
}
}
@@ -7139,7 +7105,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
WaitCursor ();
- if (!KeyFilesApply (hwndDlg, &volumePassword, FirstKeyFile))
+ if (!KeyFilesApply (hwndDlg, &volumePassword, FirstKeyFile, NULL))
{
NormalCursor ();
return 1;
@@ -7244,7 +7210,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (KeyFilesEnable)
{
- KeyFilesApply (hwndDlg, &volumePassword, FirstKeyFile);
+ KeyFilesApply (hwndDlg, &volumePassword, FirstKeyFile, NULL);
}
if (!bInPlaceEncNonSys)