From 53aabf3f14e75762759bf58fbe726934db38ef76 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 5 May 2016 13:12:25 +0200 Subject: Windows: Add option and command line switch to hide waiting dialog when performing operations. --- Translations/Language.ar.xml | 1 + Translations/Language.be.xml | 1 + Translations/Language.bg.xml | 1 + Translations/Language.ca.xml | 1 + Translations/Language.cs.xml | 1 + Translations/Language.da.xml | 1 + Translations/Language.de.xml | 1 + Translations/Language.el.xml | 1 + Translations/Language.es.xml | 1 + Translations/Language.et.xml | 1 + Translations/Language.eu.xml | 1 + Translations/Language.fa.xml | 1 + Translations/Language.fi.xml | 1 + Translations/Language.fr.xml | 1 + Translations/Language.hu.xml | 1 + Translations/Language.id.xml | 1 + Translations/Language.it.xml | 1 + Translations/Language.ja.xml | 1 + Translations/Language.ka.xml | 1 + Translations/Language.ko.xml | 1 + Translations/Language.lv.xml | 1 + Translations/Language.my.xml | 1 + Translations/Language.nl.xml | 1 + Translations/Language.nn.xml | 1 + Translations/Language.pl.xml | 1 + Translations/Language.pt-br.xml | 1 + Translations/Language.ru.xml | 1 + Translations/Language.sk.xml | 1 + Translations/Language.sl.xml | 1 + Translations/Language.sv.xml | 1 + Translations/Language.tr.xml | 1 + Translations/Language.uk.xml | 1 + Translations/Language.uz.xml | 1 + Translations/Language.vi.xml | 1 + Translations/Language.zh-cn.xml | 1 + Translations/Language.zh-hk.xml | 1 + Translations/Language.zh-tw.xml | 1 + src/Common/Dlgcode.c | 40 +++++++++++++++++++++++++++++++++------- src/Common/Dlgcode.h | 3 +++ src/Common/Language.xml | 1 + src/ExpandVolume/WinMain.cpp | 2 ++ src/Format/Tcformat.c | 2 ++ src/Mount/Mount.c | 30 ++++++++++++++++++++++++++++++ src/Mount/Mount.rc | 26 ++++++++++++++------------ src/Mount/Resource.h | 3 ++- 45 files changed, 124 insertions(+), 20 deletions(-) diff --git a/Translations/Language.ar.xml b/Translations/Language.ar.xml index a71277b6..abc7678e 100644 --- a/Translations/Language.ar.xml +++ b/Translations/Language.ar.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.be.xml b/Translations/Language.be.xml index 1906497c..179343da 100644 --- a/Translations/Language.be.xml +++ b/Translations/Language.be.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.bg.xml b/Translations/Language.bg.xml index a2d27cdd..42e159bc 100644 --- a/Translations/Language.bg.xml +++ b/Translations/Language.bg.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.ca.xml b/Translations/Language.ca.xml index c456a481..48d11633 100644 --- a/Translations/Language.ca.xml +++ b/Translations/Language.ca.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.cs.xml b/Translations/Language.cs.xml index d1016538..129088b2 100644 --- a/Translations/Language.cs.xml +++ b/Translations/Language.cs.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.da.xml b/Translations/Language.da.xml index a54b69ef..e517b430 100644 --- a/Translations/Language.da.xml +++ b/Translations/Language.da.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.de.xml b/Translations/Language.de.xml index dcadd871..d5baa28f 100644 --- a/Translations/Language.de.xml +++ b/Translations/Language.de.xml @@ -1400,6 +1400,7 @@ WARNUNG: Sie sollten nicht vergessen, dass, wenn Sie diese Option aktivieren, der PIM-Wert unverschlüsselt auf der Festplatte gespeichert wird.\n\nSind Sie sicher, dass Sie diese Option aktivieren möchten? Der größtmögliche Wert für den PIM (Personal Iterations Multiplier) ist 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.el.xml b/Translations/Language.el.xml index dd00da12..51ca7a69 100644 --- a/Translations/Language.el.xml +++ b/Translations/Language.el.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.es.xml b/Translations/Language.es.xml index 63c4be2e..b5931fb7 100644 --- a/Translations/Language.es.xml +++ b/Translations/Language.es.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.et.xml b/Translations/Language.et.xml index 82ea08cd..65c41794 100644 --- a/Translations/Language.et.xml +++ b/Translations/Language.et.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.eu.xml b/Translations/Language.eu.xml index 84df78e6..5b3ccc02 100644 --- a/Translations/Language.eu.xml +++ b/Translations/Language.eu.xml @@ -1400,6 +1400,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.fa.xml b/Translations/Language.fa.xml index 5c91ad5e..dd857088 100644 --- a/Translations/Language.fa.xml +++ b/Translations/Language.fa.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.fi.xml b/Translations/Language.fi.xml index 1deb448a..92026eb3 100644 --- a/Translations/Language.fi.xml +++ b/Translations/Language.fi.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.fr.xml b/Translations/Language.fr.xml index 8c54243e..f2530c43 100644 --- a/Translations/Language.fr.xml +++ b/Translations/Language.fr.xml @@ -1398,6 +1398,7 @@ AVERTISSEMENT : Gardez à l'esprit que si vous activez cette option, la valeur du PIM sera écrite non chiffrée sur le disk.\n\nÊtes-vous sûr que vous souhaitez activer cette option ? La valeur maximale du PIM est 2147468. Ne pas vérifier le disque de secours + Ne pas afficher la fenêtre d'attente lors de l'exécution des opérations diff --git a/Translations/Language.hu.xml b/Translations/Language.hu.xml index bb8e7009..d2e3b60b 100644 --- a/Translations/Language.hu.xml +++ b/Translations/Language.hu.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.id.xml b/Translations/Language.id.xml index 9b0d3ca3..3f8fd191 100644 --- a/Translations/Language.id.xml +++ b/Translations/Language.id.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.it.xml b/Translations/Language.it.xml index 74ada70a..0ee25d84 100644 --- a/Translations/Language.it.xml +++ b/Translations/Language.it.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.ja.xml b/Translations/Language.ja.xml index 928deb60..1285dcf3 100644 --- a/Translations/Language.ja.xml +++ b/Translations/Language.ja.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.ka.xml b/Translations/Language.ka.xml index cb4b6150..6b2b5e89 100644 --- a/Translations/Language.ka.xml +++ b/Translations/Language.ka.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.ko.xml b/Translations/Language.ko.xml index 9d5eb578..1c72d208 100644 --- a/Translations/Language.ko.xml +++ b/Translations/Language.ko.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.lv.xml b/Translations/Language.lv.xml index bd482f29..bc53b65a 100644 --- a/Translations/Language.lv.xml +++ b/Translations/Language.lv.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.my.xml b/Translations/Language.my.xml index 654ea5b6..f622273b 100644 --- a/Translations/Language.my.xml +++ b/Translations/Language.my.xml @@ -1400,6 +1400,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.nl.xml b/Translations/Language.nl.xml index df38c6f9..da3a5065 100644 --- a/Translations/Language.nl.xml +++ b/Translations/Language.nl.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.nn.xml b/Translations/Language.nn.xml index 1a8dbfd9..39a98263 100644 --- a/Translations/Language.nn.xml +++ b/Translations/Language.nn.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.pl.xml b/Translations/Language.pl.xml index f199462a..c5649355 100644 --- a/Translations/Language.pl.xml +++ b/Translations/Language.pl.xml @@ -1399,6 +1399,7 @@ płyty ratunkowej VeraCrypt, włóż ją do napędu CD/DVD i uruchom ponownie ko WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.pt-br.xml b/Translations/Language.pt-br.xml index 13185d2d..8efe6ea0 100644 --- a/Translations/Language.pt-br.xml +++ b/Translations/Language.pt-br.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.ru.xml b/Translations/Language.ru.xml index aaa25494..3f4aca68 100644 --- a/Translations/Language.ru.xml +++ b/Translations/Language.ru.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.sk.xml b/Translations/Language.sk.xml index 0a24a067..b7e698c2 100644 --- a/Translations/Language.sk.xml +++ b/Translations/Language.sk.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.sl.xml b/Translations/Language.sl.xml index a9a34c56..3999bede 100644 --- a/Translations/Language.sl.xml +++ b/Translations/Language.sl.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.sv.xml b/Translations/Language.sv.xml index 2af3debe..ade599d5 100644 --- a/Translations/Language.sv.xml +++ b/Translations/Language.sv.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.tr.xml b/Translations/Language.tr.xml index 9bc153f9..e2806dbb 100644 --- a/Translations/Language.tr.xml +++ b/Translations/Language.tr.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.uk.xml b/Translations/Language.uk.xml index a8546a6e..fe353885 100644 --- a/Translations/Language.uk.xml +++ b/Translations/Language.uk.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.uz.xml b/Translations/Language.uz.xml index d4d0f060..93a356f4 100644 --- a/Translations/Language.uz.xml +++ b/Translations/Language.uz.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.vi.xml b/Translations/Language.vi.xml index f094d204..53eb26e3 100644 --- a/Translations/Language.vi.xml +++ b/Translations/Language.vi.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.zh-cn.xml b/Translations/Language.zh-cn.xml index 1f691aae..53e7c6d7 100644 --- a/Translations/Language.zh-cn.xml +++ b/Translations/Language.zh-cn.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.zh-hk.xml b/Translations/Language.zh-hk.xml index 9b9b3c6e..69eaa126 100644 --- a/Translations/Language.zh-hk.xml +++ b/Translations/Language.zh-hk.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/Translations/Language.zh-tw.xml b/Translations/Language.zh-tw.xml index 8e29190f..2208034b 100644 --- a/Translations/Language.zh-tw.xml +++ b/Translations/Language.zh-tw.xml @@ -1396,6 +1396,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 6958afe9..97dd5247 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -104,6 +104,9 @@ wchar_t *lpszTitle = NULL; BOOL Silent = FALSE; BOOL bPreserveTimestamp = TRUE; BOOL bShowDisconnectedNetworkDrives = FALSE; +BOOL bHideWaitingDialog = FALSE; +BOOL bCmdHideWaitingDialog = FALSE; +BOOL bCmdHideWaitingDialogValid = FALSE; BOOL bStartOnLogon = FALSE; BOOL bMountDevicesOnLogon = FALSE; BOOL bMountFavoritesOnLogon = FALSE; @@ -1686,14 +1689,21 @@ SplashDlgProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return DefDlgProcW (hwnd, uMsg, wParam, lParam); } +static int g_waitCursorCounter = 0; + void WaitCursor () { static HCURSOR hcWait; if (hcWait == NULL) hcWait = LoadCursor (NULL, IDC_WAIT); - SetCursor (hcWait); - hCursor = hcWait; + + if ((g_waitCursorCounter == 0) || (hCursor != hcWait)) + { + SetCursor (hcWait); + hCursor = hcWait; + } + g_waitCursorCounter++; } void @@ -1702,8 +1712,13 @@ NormalCursor () static HCURSOR hcArrow; if (hcArrow == NULL) hcArrow = LoadCursor (NULL, IDC_ARROW); - SetCursor (hcArrow); - hCursor = NULL; + if (g_waitCursorCounter > 0) + g_waitCursorCounter--; + if (g_waitCursorCounter == 0) + { + SetCursor (hcArrow); + hCursor = NULL; + } } void @@ -1712,8 +1727,12 @@ ArrowWaitCursor () static HCURSOR hcArrowWait; if (hcArrowWait == NULL) hcArrowWait = LoadCursor (NULL, IDC_APPSTARTING); - SetCursor (hcArrowWait); - hCursor = hcArrowWait; + if ((g_waitCursorCounter == 0) || (hCursor != hcArrowWait)) + { + SetCursor (hcArrowWait); + hCursor = hcArrowWait; + } + g_waitCursorCounter++; } void HandCursor () @@ -5399,8 +5418,12 @@ BOOL CALLBACK BenchmarkDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP threadParam.hBenchDlg = hwndDlg; threadParam.bStatus = FALSE; + WaitCursor (); + ShowWaitDialog (hwndDlg, TRUE, BenchmarkThreadProc, &threadParam); + NormalCursor (); + if (threadParam.bStatus == FALSE) { EndDialog (hwndDlg, IDCLOSE); @@ -7092,13 +7115,16 @@ void BringToForeground(HWND hWnd) void ShowWaitDialog(HWND hwnd, BOOL bUseHwndAsParent, WaitThreadProc callback, void* pArg) { HWND hParent = (hwnd && bUseHwndAsParent)? hwnd : GetDesktopWindow(); + BOOL bEffectiveHideWaitingDialog = bCmdHideWaitingDialogValid? bCmdHideWaitingDialog : bHideWaitingDialog; WaitThreadParam threadParam; threadParam.callback = callback; threadParam.pArg = pArg; - if (WaitDialogDisplaying) + if (WaitDialogDisplaying || bEffectiveHideWaitingDialog) { + if (!WaitDialogDisplaying) WaitCursor (); callback (pArg, hwnd); + if (!WaitDialogDisplaying) NormalCursor (); } else { diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h index d9f29cd0..cf9239e0 100644 --- a/src/Common/Dlgcode.h +++ b/src/Common/Dlgcode.h @@ -117,6 +117,9 @@ extern BOOL Silent; extern BOOL bHistory; extern BOOL bPreserveTimestamp; extern BOOL bShowDisconnectedNetworkDrives; +extern BOOL bHideWaitingDialog; +extern BOOL bCmdHideWaitingDialog; +extern BOOL bCmdHideWaitingDialogValid; extern BOOL bStartOnLogon; extern BOOL bMountDevicesOnLogon; extern BOOL bMountFavoritesOnLogon; diff --git a/src/Common/Language.xml b/src/Common/Language.xml index b64e8568..add35c7a 100644 --- a/src/Common/Language.xml +++ b/src/Common/Language.xml @@ -1398,6 +1398,7 @@ WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option? Personal Iterations Multiplier (PIM) maximum value is 2147468. Skip Rescue Disk verification + Don't show wait message dialog when performing operations diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp index e6efd1db..fb9d52af 100644 --- a/src/ExpandVolume/WinMain.cpp +++ b/src/ExpandVolume/WinMain.cpp @@ -283,6 +283,7 @@ void LoadSettings (HWND hwndDlg) bPreserveTimestamp = defaultMountOptions.PreserveTimestamp = ConfigReadInt ("PreserveTimestamps", TRUE); bShowDisconnectedNetworkDrives = ConfigReadInt ("ShowDisconnectedNetworkDrives", FALSE); + bHideWaitingDialog = ConfigReadInt ("HideWaitingDialog", FALSE); defaultMountOptions.Removable = ConfigReadInt ("MountVolumesRemovable", FALSE); defaultMountOptions.ReadOnly = ConfigReadInt ("MountVolumesReadOnly", FALSE); defaultMountOptions.ProtectHiddenVolume = FALSE; @@ -873,6 +874,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; if (UsePreferences) { diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index 4a002084..a4372533 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -766,6 +766,8 @@ static void LoadSettingsAndCheckModified (HWND hwndDlg, BOOL bOnlyCheckModified, ConfigReadCompareInt ("ShowDisconnectedNetworkDrives", FALSE, &bShowDisconnectedNetworkDrives, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("HideWaitingDialog", FALSE, &bHideWaitingDialog, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("SaveVolumeHistory", FALSE, &bHistory, bOnlyCheckModified, pbSettingsModified); { diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 7dabc5ff..5bcaddad 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(); diff --git a/src/Mount/Mount.rc b/src/Mount/Mount.rc index 96bb95c4..4aad9360 100644 --- a/src/Mount/Mount.rc +++ b/src/Mount/Mount.rc @@ -41,7 +41,7 @@ IDR_MOUNT_TLB TYPELIB "Mount.tlb" // Dialog // -IDD_PREFERENCES_DLG DIALOGEX 0, 0, 336, 316 +IDD_PREFERENCES_DLG DIALOGEX 0, 0, 336, 333 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "VeraCrypt - Preferences" FONT 8, "MS Shell Dlg", 400, 0, 0x1 @@ -78,26 +78,28 @@ BEGIN CONTROL "Make disconnected network drives available for mounting",IDC_SHOW_DISCONNECTED_NETWORK_DRIVES, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,208,316,10 CONTROL "Cache passwords in driver memory",IDC_PREF_CACHE_PASSWORDS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,238,146,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,254,146,11 CONTROL "Wipe cached passwords on exit",IDC_PREF_WIPE_CACHE_ON_EXIT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,162,238,165,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,162,254,165,11 CONTROL "Temporary Cache password during ""Mount Favorite Volumes"" operations",IDC_PREF_TEMP_CACHE_ON_MULTIPLE_MOUNT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,252,294,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,268,294,11 CONTROL "Wipe cached passwords on auto-dismount",IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,266,296,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,282,296,11 CONTROL "Include PIM when caching a password",IDC_PREF_CACHE_PIM, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,280,296,10 - PUSHBUTTON "More Settings...",IDC_MORE_SETTINGS,5,300,85,14 - DEFPUSHBUTTON "OK",IDOK,225,300,50,14 - PUSHBUTTON "Cancel",IDCANCEL,281,300,50,14 - GROUPBOX "Windows",IDT_WINDOWS_RELATED_SETTING,4,160,328,62 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,296,296,10 + PUSHBUTTON "More Settings...",IDC_MORE_SETTINGS,5,317,85,14 + DEFPUSHBUTTON "OK",IDOK,225,317,50,14 + PUSHBUTTON "Cancel",IDCANCEL,281,317,50,14 + GROUPBOX "Windows",IDT_WINDOWS_RELATED_SETTING,4,160,328,76 GROUPBOX "Default Mount Options",IDT_DEFAULT_MOUNT_OPTIONS,4,3,328,26 GROUPBOX "VeraCrypt Background Task",IDT_TASKBAR_ICON,4,33,328,26 GROUPBOX "Auto-Dismount",IDT_AUTO_DISMOUNT,4,94,328,62 LTEXT "minutes",IDT_MINUTES,289,129,39,10 LTEXT "Dismount all when:",IDT_AUTO_DISMOUNT_ON,9,104,71,20 - GROUPBOX "Password Cache",IDT_PW_CACHE_OPTIONS,4,227,328,68 + GROUPBOX "Password Cache",IDT_PW_CACHE_OPTIONS,4,243,328,68 GROUPBOX "Actions to perform upon logon to Windows",IDT_LOGON,4,63,328,28 + CONTROL "Don't show wait message dialog when performing operations",IDC_HIDE_WAITING_DIALOG, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,220,316,10 END IDD_VOLUME_PROPERTIES DIALOGEX 60, 30, 284, 224 @@ -398,7 +400,7 @@ BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 329 TOPMARGIN, 7 - BOTTOMMARGIN, 314 + BOTTOMMARGIN, 331 END IDD_VOLUME_PROPERTIES, DIALOG diff --git a/src/Mount/Resource.h b/src/Mount/Resource.h index c5a45af4..210cfde2 100644 --- a/src/Mount/Resource.h +++ b/src/Mount/Resource.h @@ -180,6 +180,7 @@ #define IDC_FAVORITE_VOLUME_ID 1158 #define IDC_FAVORITE_USE_VOLUME_ID 1159 #define IDC_DISABLE_BOOT_LOADER_PIM_PROMPT 1160 +#define IDC_HIDE_WAITING_DIALOG 1161 #define IDM_HELP 40001 #define IDM_ABOUT 40002 #define IDM_UNMOUNT_VOLUME 40003 @@ -256,7 +257,7 @@ #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 119 #define _APS_NEXT_COMMAND_VALUE 40069 -#define _APS_NEXT_CONTROL_VALUE 1161 +#define _APS_NEXT_CONTROL_VALUE 1162 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif -- cgit v1.2.3