From 1ef6177ae3605b4aa24beb6d9a0da214c15e100e Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 18 Dec 2016 15:26:35 +0100 Subject: Linux & MacOSX: automatically check TrueCryptMode in password dialog when selecting a container file that has the .tc file extension --- src/Main/Forms/ChangePasswordDialog.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Main/Forms/ChangePasswordDialog.cpp') diff --git a/src/Main/Forms/ChangePasswordDialog.cpp b/src/Main/Forms/ChangePasswordDialog.cpp index ac8e8147..5b2fdd04 100644 --- a/src/Main/Forms/ChangePasswordDialog.cpp +++ b/src/Main/Forms/ChangePasswordDialog.cpp @@ -24,6 +24,12 @@ namespace VeraCrypt bool enableNewPassword = false; bool enableNewKeyfiles = false; bool enablePkcs5Prf = false; + bool isTrueCryptFile = false; + + if (volumePath && volumePath->HasTrueCryptExtension ()) + { + isTrueCryptFile = true; + } switch (mode) { @@ -54,6 +60,7 @@ namespace VeraCrypt CurrentPasswordPanel = new VolumePasswordPanel (this, NULL, password, false, keyfiles, false, true, true, false, true, true); CurrentPasswordPanel->UpdateEvent.Connect (EventConnector (this, &ChangePasswordDialog::OnPasswordPanelUpdate)); + CurrentPasswordPanel->SetTrueCryptMode (isTrueCryptFile); CurrentPasswordPanelSizer->Add (CurrentPasswordPanel, 1, wxALL | wxEXPAND); NewPasswordPanel = new VolumePasswordPanel (this, NULL, newPassword, true, newKeyfiles, false, enableNewPassword, enableNewKeyfiles, enableNewPassword, enablePkcs5Prf); -- cgit v1.2.3