From 11716ed2dacbb104f8f59867fe66f2c0a6984291 Mon Sep 17 00:00:00 2001 From: David Foerster Date: Tue, 10 May 2016 22:16:32 +0200 Subject: Remove trailing whitespace --- src/Main/Forms/VolumePasswordPanel.cpp | 42 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/Main/Forms/VolumePasswordPanel.cpp') diff --git a/src/Main/Forms/VolumePasswordPanel.cpp b/src/Main/Forms/VolumePasswordPanel.cpp index 27d66bd8..920d4f96 100644 --- a/src/Main/Forms/VolumePasswordPanel.cpp +++ b/src/Main/Forms/VolumePasswordPanel.cpp @@ -3,7 +3,7 @@ Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. - Modifications and additions to the original source code (contained in this file) + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source @@ -43,7 +43,7 @@ namespace VeraCrypt } CacheCheckBox->Show (enableCache); - + if (!enablePassword && enableKeyfiles) { Layout(); @@ -58,8 +58,8 @@ namespace VeraCrypt PasswordStaticText->Show (enablePassword); PasswordTextCtrl->Show (enablePassword); DisplayPasswordCheckBox->Show (enablePassword); - - + + EnablePimEntry = enablePassword && (!enableConfirmation || (enablePkcs5Prf && !isMountPassword)); PimCheckBox->Show (EnablePimEntry); VolumePimStaticText->Show (false); @@ -71,12 +71,12 @@ namespace VeraCrypt ConfirmPasswordStaticText->Show (enableConfirmation); ConfirmPasswordTextCtrl->Show (enableConfirmation); - + UseKeyfilesCheckBox->Show (enableKeyfiles); KeyfilesButton->Show (enableKeyfiles); Pkcs5PrfStaticText->Show (enablePkcs5Prf); - Pkcs5PrfChoice->Show (enablePkcs5Prf); + Pkcs5PrfChoice->Show (enablePkcs5Prf); TrueCryptModeCheckBox->Show (!disableTruecryptMode); HeaderWipeCountText->Show (enablePkcs5Prf && !isMountPassword); HeaderWipeCount->Show (enablePkcs5Prf && !isMountPassword); @@ -104,20 +104,20 @@ namespace VeraCrypt } if (enablePkcs5Prf) - { + { int index, prfInitialIndex = 0; if (isMountPassword) { // case of password for mounting Pkcs5PrfChoice->Delete (0); - Pkcs5PrfChoice->Append (LangString["AUTODETECTION"]); + Pkcs5PrfChoice->Append (LangString["AUTODETECTION"]); } foreach_ref (const Pkcs5Kdf &kdf, Pkcs5Kdf::GetAvailableAlgorithms(false)) { if (!kdf.IsDeprecated() || isMountPassword) { index = Pkcs5PrfChoice->Append (kdf.GetName()); - if (isMountPassword && options && options->Kdf + if (isMountPassword && options && options->Kdf && (options->Kdf->GetName() == kdf.GetName()) ) { @@ -199,7 +199,7 @@ namespace VeraCrypt int colspan = isPim? 1 : 2; wxTextCtrl *newTextCtrl = new wxTextCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, display ? 0 : wxTE_PASSWORD); - newTextCtrl->SetMaxLength (isPim? MAX_PIM_DIGITS : VolumePassword::MaxSize); + newTextCtrl->SetMaxLength (isPim? MAX_PIM_DIGITS : VolumePassword::MaxSize); newTextCtrl->SetValue ((*textCtrl)->GetValue()); newTextCtrl->SetMinSize ((*textCtrl)->GetSize()); @@ -270,7 +270,7 @@ namespace VeraCrypt return shared_ptr (); } } - + int VolumePasswordPanel::GetVolumePim () const { if (VolumePimTextCtrl->IsEnabled () && VolumePimTextCtrl->IsShown ()) @@ -279,7 +279,7 @@ namespace VeraCrypt long pim = 0; if (pimStr.IsEmpty()) return 0; - if (((size_t) wxNOT_FOUND == pimStr.find_first_not_of (wxT("0123456789"))) + if (((size_t) wxNOT_FOUND == pimStr.find_first_not_of (wxT("0123456789"))) && pimStr.ToLong (&pim) && pim <= MAX_PIM_VALUE) return (int) pim; @@ -288,7 +288,7 @@ namespace VeraCrypt } else return 0; - } + } void VolumePasswordPanel::SetVolumePim (int pim) { @@ -306,7 +306,7 @@ namespace VeraCrypt { return TrueCryptModeCheckBox->GetValue (); } - + int VolumePasswordPanel::GetHeaderWipeCount () const { try @@ -393,10 +393,10 @@ namespace VeraCrypt void VolumePasswordPanel::OnDisplayPasswordCheckBoxClick (wxCommandEvent& event) { DisplayPassword (event.IsChecked(), &PasswordTextCtrl, 1); - + if (ConfirmPasswordTextCtrl->IsShown()) DisplayPassword (event.IsChecked(), &ConfirmPasswordTextCtrl, 2); - + if (VolumePimTextCtrl->IsShown()) DisplayPassword (event.IsChecked(), &VolumePimTextCtrl, 3); @@ -467,7 +467,7 @@ namespace VeraCrypt VolumePimHelpStaticText->SetLabel(LangString["IDC_PIM_HELP"]); guiUpdated = true; } - + if (guiUpdated) { Layout(); @@ -485,8 +485,8 @@ namespace VeraCrypt PimCheckBox->Show (false); VolumePimStaticText->Show (true); VolumePimTextCtrl->Show (true); - VolumePimHelpStaticText->Show (true); - + VolumePimHelpStaticText->Show (true); + if (DisplayPasswordCheckBox->IsChecked ()) DisplayPassword (true, &VolumePimTextCtrl, 3); else @@ -494,12 +494,12 @@ namespace VeraCrypt Layout(); Fit(); } - + GetParent()->Layout(); GetParent()->Fit(); } } - + void VolumePasswordPanel::OnTrueCryptModeChecked( wxCommandEvent& event ) { bool bEnablePIM = !GetTrueCryptMode (); -- cgit v1.2.3