VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount/Mount.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-05-05 11:12:25 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-05-05 14:48:05 (GMT)
commit53aabf3f14e75762759bf58fbe726934db38ef76 (patch)
treed63c649ff16f714b85ab3d71169c970a55b00cab /src/Mount/Mount.c
parentfb9a49cb1afeebfda621774cd381791c78721949 (diff)
downloadVeraCrypt-53aabf3f14e75762759bf58fbe726934db38ef76.zip
VeraCrypt-53aabf3f14e75762759bf58fbe726934db38ef76.tar.gz
Windows: Add option and command line switch to hide waiting dialog when performing operations.
Diffstat (limited to 'src/Mount/Mount.c')
-rw-r--r--src/Mount/Mount.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 7dabc5f..5bcadda 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -709,6 +709,8 @@ void LoadSettingsAndCheckModified (HWND hwndDlg, BOOL bOnlyCheckModified, BOOL*
ConfigReadCompareInt ("ShowDisconnectedNetworkDrives", FALSE, &bShowDisconnectedNetworkDrives, bOnlyCheckModified, pbSettingsModified);
+ ConfigReadCompareInt ("HideWaitingDialog", FALSE, &bHideWaitingDialog, bOnlyCheckModified, pbSettingsModified);
+
ConfigReadCompareInt ("MountVolumesRemovable", FALSE, &defaultMountOptions.Removable, bOnlyCheckModified, pbSettingsModified);
ConfigReadCompareInt ("MountVolumesReadOnly", FALSE, &defaultMountOptions.ReadOnly, bOnlyCheckModified, pbSettingsModified);
@@ -865,6 +867,7 @@ void SaveSettings (HWND hwndDlg)
ConfigWriteInt ("MountVolumesRemovable", defaultMountOptions.Removable);
ConfigWriteInt ("PreserveTimestamps", defaultMountOptions.PreserveTimestamp);
ConfigWriteInt ("ShowDisconnectedNetworkDrives",bShowDisconnectedNetworkDrives);
+ ConfigWriteInt ("HideWaitingDialog", bHideWaitingDialog);
ConfigWriteInt ("EnableBackgroundTask", bEnableBkgTask);
ConfigWriteInt ("CloseBackgroundTaskOnNoVolumes", bCloseBkgTaskWhenNoVolumes);
@@ -3104,6 +3107,9 @@ BOOL CALLBACK PreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
SendMessage (GetDlgItem (hwndDlg, IDC_SHOW_DISCONNECTED_NETWORK_DRIVES), BM_SETCHECK,
bShowDisconnectedNetworkDrives ? BST_CHECKED:BST_UNCHECKED, 0);
+
+ SendMessage (GetDlgItem (hwndDlg, IDC_HIDE_WAITING_DIALOG), BM_SETCHECK,
+ bHideWaitingDialog ? BST_CHECKED:BST_UNCHECKED, 0);
SendMessage (GetDlgItem (hwndDlg, IDC_PREF_TEMP_CACHE_ON_MULTIPLE_MOUNT), BM_SETCHECK,
bCacheDuringMultipleMount ? BST_CHECKED:BST_UNCHECKED, 0);
@@ -3219,6 +3225,7 @@ BOOL CALLBACK PreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
bUseDifferentTrayIconIfVolMounted = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_USE_DIFF_TRAY_ICON_IF_VOL_MOUNTED));
bPreserveTimestamp = defaultMountOptions.PreserveTimestamp = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PRESERVE_TIMESTAMPS));
bShowDisconnectedNetworkDrives = IsButtonChecked (GetDlgItem (hwndDlg, IDC_SHOW_DISCONNECTED_NETWORK_DRIVES));
+ bHideWaitingDialog = IsButtonChecked (GetDlgItem (hwndDlg, IDC_HIDE_WAITING_DIALOG));
bCacheDuringMultipleMount = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_TEMP_CACHE_ON_MULTIPLE_MOUNT));
bWipeCacheOnExit = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_WIPE_CACHE_ON_EXIT));
bWipeCacheOnAutoDismount = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT));
@@ -6371,6 +6378,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
// Set critical default options in case UsePreferences is false
bPreserveTimestamp = defaultMountOptions.PreserveTimestamp = TRUE;
bShowDisconnectedNetworkDrives = FALSE;
+ bHideWaitingDialog = FALSE;
ResetWrongPwdRetryCount ();
@@ -8353,6 +8361,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
OptionTrueCryptMode,
OptionPim,
OptionTryEmptyPassword,
+ OptionNoWaitDlg,
};
argument args[]=
@@ -8379,6 +8388,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
{ OptionVolume, L"/volume", L"/v", FALSE },
{ CommandWipeCache, L"/wipecache", L"/w", FALSE },
{ OptionTryEmptyPassword, L"/tryemptypass", NULL, FALSE },
+ { OptionNoWaitDlg, L"/nowaitdlg", NULL, FALSE },
};
argumentspec as;
@@ -8431,6 +8441,25 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
}
break;
+ case OptionNoWaitDlg:
+ {
+ wchar_t szTmp[16] = {0};
+ bCmdHideWaitingDialog = TRUE;
+ bCmdHideWaitingDialogValid = TRUE;
+
+ if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs, &i, nNoCommandLineArgs,
+ szTmp, ARRAYSIZE (szTmp)))
+ {
+ if (!_wcsicmp(szTmp,L"n") || !_wcsicmp(szTmp,L"no"))
+ bCmdHideWaitingDialog = FALSE;
+ else if (!_wcsicmp(szTmp,L"y") || !_wcsicmp(szTmp,L"yes"))
+ bCmdHideWaitingDialog = TRUE;
+ else
+ AbortProcess ("COMMAND_LINE_ERROR");
+ }
+ }
+ break;
+
case OptionCache:
{
wchar_t szTmp[16] = {0};
@@ -8855,6 +8884,7 @@ static BOOL StartSystemFavoritesService ()
Silent = TRUE;
DeviceChangeBroadcastDisabled = TRUE;
bShowDisconnectedNetworkDrives = TRUE;
+ bHideWaitingDialog = TRUE;
InitOSVersionInfo();