From a43a5ebb2136a77be8e79546f329412e4bef14c4 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 13 Jul 2015 02:00:26 +0200 Subject: Windows: Modify PIM parts in GUI to make it easier to use. Users must explicitly check "User PIM" to enable its use. --- src/Common/Dlgcode.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Common/Dlgcode.c') diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 478af87c..2742317f 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -118,6 +118,7 @@ BOOL bPortableModeConfirmed = FALSE; // TRUE if it is certain that the instance BOOL bInPlaceEncNonSysPending = FALSE; // TRUE if the non-system in-place encryption config file indicates that one or more partitions are scheduled to be encrypted. This flag is set only when config files are loaded during app startup. /* Globals used by Mount and Format (separately per instance) */ +BOOL PimEnable = FALSE; BOOL KeyFilesEnable = FALSE; KeyFile *FirstKeyFile = NULL; KeyFilesDlgParam defaultKeyFilesParam; @@ -9185,6 +9186,10 @@ void Applink (char *dest, BOOL bSendOS, char *extraOutput) { StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Contact"); } + else if (strcmp(dest, "pim") == 0) + { + StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Personal%20Iterations%20Multiplier%20%28PIM%29"); + } else { StringCbCopyA (url, sizeof (url),TC_APPLINK); @@ -10765,7 +10770,8 @@ std::string FindLatestFileOrDirectory (const std::string &directory, const char int GetPim (HWND hwndDlg, UINT ctrlId) { int pim = 0; - if (IsWindowEnabled (GetDlgItem (hwndDlg, ctrlId))) + HWND hCtrl = GetDlgItem (hwndDlg, ctrlId); + if (IsWindowEnabled (hCtrl) && IsWindowVisible (hCtrl)) { char szTmp[MAX_PIM + 1] = {0}; if (GetDlgItemText (hwndDlg, ctrlId, szTmp, MAX_PIM + 1) > 0) -- cgit v1.2.3