From aac203673858e9d16974fb1f8a0a72c3b3eaec14 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 8 Aug 2018 00:10:07 +0200 Subject: Linux/MacOSX/FreeBSD: Add CheckBox in mount option dialog to force the use of embedded backup header during mount. --- src/Main/Forms/Forms.cpp | 3 + src/Main/Forms/Forms.h | 517 +++++++++++++++++----------------- src/Main/Forms/MountOptionsDialog.cpp | 1 + src/Main/Forms/TrueCrypt.fbp | 88 ++++++ 4 files changed, 351 insertions(+), 258 deletions(-) diff --git a/src/Main/Forms/Forms.cpp b/src/Main/Forms/Forms.cpp index 3b6dc2cc..2df4f3ae 100644 --- a/src/Main/Forms/Forms.cpp +++ b/src/Main/Forms/Forms.cpp @@ -1567,6 +1567,9 @@ MountOptionsDialogBase::MountOptionsDialogBase( wxWindow* parent, wxWindowID id, RemovableCheckBox = new wxCheckBox( OptionsPanel, wxID_ANY, _("Mount volume as removable &medium"), wxDefaultPosition, wxDefaultSize, 0 ); OptionsSizer->Add( RemovableCheckBox, 0, wxALL, 5 ); + BackupHeaderCheckBox = new wxCheckBox( OptionsPanel, wxID_ANY, _("Use backup header embedded in &volume if available"), wxDefaultPosition, wxDefaultSize, 0 ); + OptionsSizer->Add( BackupHeaderCheckBox, 0, wxALL, 5 ); + PartitionInSystemEncryptionScopeCheckBox = new wxCheckBox( OptionsPanel, wxID_ANY, _("Mount partition &using system encryption (preboot authentication)"), wxDefaultPosition, wxDefaultSize, 0 ); OptionsSizer->Add( PartitionInSystemEncryptionScopeCheckBox, 0, wxALL, 5 ); diff --git a/src/Main/Forms/Forms.h b/src/Main/Forms/Forms.h index 129ae153..bad0be0e 100644 --- a/src/Main/Forms/Forms.h +++ b/src/Main/Forms/Forms.h @@ -50,10 +50,10 @@ namespace VeraCrypt /////////////////////////////////////////////////////////////////////////////// /// Class MainFrameBase /////////////////////////////////////////////////////////////////////////////// - class MainFrameBase : public wxFrame + class MainFrameBase : public wxFrame { private: - + protected: wxMenuBar* MainMenuBar; wxMenu* VolumesMenu; @@ -91,7 +91,7 @@ namespace VeraCrypt wxButton* MountAllDevicesButton; wxButton* DismountAllButton; wxButton* ExitButton; - + // Virtual event handlers, overide them in your derived class virtual void OnActivate( wxActivateEvent& event ) { event.Skip(); } virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } @@ -145,23 +145,23 @@ namespace VeraCrypt virtual void OnSelectDeviceButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnVolumeButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnExitButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - + MainFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("VeraCrypt"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxMINIMIZE_BOX|wxSYSTEM_MENU|wxTAB_TRAVERSAL ); - + ~MainFrameBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class WizardFrameBase /////////////////////////////////////////////////////////////////////////////// - class WizardFrameBase : public wxFrame + class WizardFrameBase : public wxFrame { private: - + protected: wxBoxSizer* MainSizer; wxPanel* MainPanel; @@ -172,7 +172,7 @@ namespace VeraCrypt wxButton* PreviousButton; wxButton* NextButton; wxButton* CancelButton; - + // Virtual event handlers, overide them in your derived class virtual void OnActivate( wxActivateEvent& event ) { event.Skip(); } virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } @@ -181,23 +181,23 @@ namespace VeraCrypt virtual void OnPreviousButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnNextButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - + WizardFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxMINIMIZE_BOX|wxSYSTEM_MENU|wxTAB_TRAVERSAL ); - + ~WizardFrameBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class AboutDialogBase /////////////////////////////////////////////////////////////////////////////// - class AboutDialogBase : public wxDialog + class AboutDialogBase : public wxDialog { private: - + protected: wxPanel* m_panel14; wxStaticBitmap* LogoBitmap; @@ -208,50 +208,50 @@ namespace VeraCrypt wxTextCtrl* CreditsTextCtrl; wxStaticLine* m_staticline4; wxStaticLine* m_staticline5; - + // Virtual event handlers, overide them in your derived class virtual void OnWebsiteHyperlinkClick( wxHyperlinkEvent& event ) { event.Skip(); } - - + + public: - - AboutDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + AboutDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~AboutDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class BenchmarkDialogBase /////////////////////////////////////////////////////////////////////////////// - class BenchmarkDialogBase : public wxDialog + class BenchmarkDialogBase : public wxDialog { private: - + protected: wxChoice* BufferSizeChoice; wxListCtrl* BenchmarkListCtrl; wxBoxSizer* RightSizer; wxButton* BenchmarkButton; wxStaticText* BenchmarkNoteStaticText; - + // Virtual event handlers, overide them in your derived class virtual void OnBenchmarkButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - BenchmarkDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("VeraCrypt - Encryption Algorithm Benchmark"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + BenchmarkDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("VeraCrypt - Encryption Algorithm Benchmark"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~BenchmarkDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class ChangePasswordDialogBase /////////////////////////////////////////////////////////////////////////////// - class ChangePasswordDialogBase : public wxDialog + class ChangePasswordDialogBase : public wxDialog { private: - + protected: wxStaticBoxSizer* CurrentSizer; wxBoxSizer* CurrentPasswordPanelSizer; @@ -259,51 +259,51 @@ namespace VeraCrypt wxBoxSizer* NewPasswordPanelSizer; wxButton* OKButton; wxButton* CancelButton; - + // Virtual event handlers, overide them in your derived class virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - ChangePasswordDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + ChangePasswordDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~ChangePasswordDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class DeviceSelectionDialogBase /////////////////////////////////////////////////////////////////////////////// - class DeviceSelectionDialogBase : public wxDialog + class DeviceSelectionDialogBase : public wxDialog { private: - + protected: wxListCtrl* DeviceListCtrl; wxStdDialogButtonSizer* StdButtons; wxButton* StdButtonsOK; wxButton* StdButtonsCancel; - + // Virtual event handlers, overide them in your derived class virtual void OnListItemActivated( wxListEvent& event ) { event.Skip(); } virtual void OnListItemDeselected( wxListEvent& event ) { event.Skip(); } virtual void OnListItemSelected( wxListEvent& event ) { event.Skip(); } - - + + public: - - DeviceSelectionDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select a Partition or Device"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + + DeviceSelectionDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select a Partition or Device"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); ~DeviceSelectionDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class EncryptionTestDialogBase /////////////////////////////////////////////////////////////////////////////// - class EncryptionTestDialogBase : public wxDialog + class EncryptionTestDialogBase : public wxDialog { private: - + protected: wxChoice* EncryptionAlgorithmChoice; wxCheckBox* XtsModeCheckBox; @@ -319,7 +319,7 @@ namespace VeraCrypt wxButton* AutoTestAllButton; wxButton* ResetButton; wxButton* CloseButton; - + // Virtual event handlers, overide them in your derived class virtual void OnEncryptionAlgorithmSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnXtsModeCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } @@ -327,22 +327,22 @@ namespace VeraCrypt virtual void OnDecryptButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnAutoTestAllButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnResetButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - EncryptionTestDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("VeraCrypt - Test Vectors"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + EncryptionTestDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("VeraCrypt - Test Vectors"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~EncryptionTestDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class FavoriteVolumesDialogBase /////////////////////////////////////////////////////////////////////////////// - class FavoriteVolumesDialogBase : public wxDialog + class FavoriteVolumesDialogBase : public wxDialog { private: - + protected: wxListCtrl* FavoritesListCtrl; wxButton* MoveUpButton; @@ -351,7 +351,7 @@ namespace VeraCrypt wxButton* RemoveAllButton; wxButton* OKButton; wxButton* CancelButton; - + // Virtual event handlers, overide them in your derived class virtual void OnListItemDeselected( wxListEvent& event ) { event.Skip(); } virtual void OnListItemSelected( wxListEvent& event ) { event.Skip(); } @@ -360,22 +360,22 @@ namespace VeraCrypt virtual void OnRemoveButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnRemoveAllButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - FavoriteVolumesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Favorite Volumes"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + FavoriteVolumesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Favorite Volumes"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~FavoriteVolumesDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class KeyfilesDialogBase /////////////////////////////////////////////////////////////////////////////// - class KeyfilesDialogBase : public wxDialog + class KeyfilesDialogBase : public wxDialog { private: - + protected: wxBoxSizer* UpperSizer; wxBoxSizer* PanelSizer; @@ -386,26 +386,26 @@ namespace VeraCrypt wxStaticText* KeyfilesNoteStaticText; wxHyperlinkCtrl* KeyfilesHyperlink; wxButton* CreateKeyfileButtton; - + // Virtual event handlers, overide them in your derived class virtual void OnKeyfilesHyperlinkClick( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnCreateKeyfileButttonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - KeyfilesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Keyfiles"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + KeyfilesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Keyfiles"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~KeyfilesDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class KeyfileGeneratorDialogBase /////////////////////////////////////////////////////////////////////////////// - class KeyfileGeneratorDialogBase : public wxDialog + class KeyfileGeneratorDialogBase : public wxDialog { private: - + protected: wxBoxSizer* MainSizer; wxChoice* HashChoice; @@ -423,46 +423,46 @@ namespace VeraCrypt wxTextCtrl* KeyfilesBaseName; wxPanel* m_panel19; wxButton* GenerateButton; - + // Virtual event handlers, overide them in your derived class virtual void OnMouseMotion( wxMouseEvent& event ) { event.Skip(); } virtual void OnHashSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnShowRandomPoolCheckBoxClicked( wxCommandEvent& event ) { event.Skip(); } virtual void OnRandomSizeCheckBoxClicked( wxCommandEvent& event ) { event.Skip(); } virtual void OnGenerateButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - KeyfileGeneratorDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + KeyfileGeneratorDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~KeyfileGeneratorDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class LegalNoticesDialogBase /////////////////////////////////////////////////////////////////////////////// - class LegalNoticesDialogBase : public wxDialog + class LegalNoticesDialogBase : public wxDialog { private: - + protected: wxTextCtrl* LegalNoticesTextCtrl; - + public: - - LegalNoticesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("VeraCrypt - Legal Notices"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + LegalNoticesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("VeraCrypt - Legal Notices"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~LegalNoticesDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class MountOptionsDialogBase /////////////////////////////////////////////////////////////////////////////// - class MountOptionsDialogBase : public wxDialog + class MountOptionsDialogBase : public wxDialog { private: - + protected: wxBoxSizer* MainSizer; wxBoxSizer* PasswordSizer; @@ -473,6 +473,7 @@ namespace VeraCrypt wxStaticBoxSizer* OptionsSizer; wxCheckBox* ReadOnlyCheckBox; wxCheckBox* RemovableCheckBox; + wxCheckBox* BackupHeaderCheckBox; wxCheckBox* PartitionInSystemEncryptionScopeCheckBox; wxStaticBoxSizer* ProtectionSizer; wxCheckBox* ProtectionCheckBox; @@ -488,7 +489,7 @@ namespace VeraCrypt wxButton* MountPointButton; wxStaticText* FilesystemOptionsStaticText; wxTextCtrl* FilesystemOptionsTextCtrl; - + // Virtual event handlers, overide them in your derived class virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } @@ -498,47 +499,47 @@ namespace VeraCrypt virtual void OnProtectionHyperlinkClick( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnNoFilesystemCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnMountPointButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - MountOptionsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Enter VeraCrypt Volume Password"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + + MountOptionsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Enter VeraCrypt Volume Password"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); ~MountOptionsDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class NewSecurityTokenKeyfileDialogBase /////////////////////////////////////////////////////////////////////////////// - class NewSecurityTokenKeyfileDialogBase : public wxDialog + class NewSecurityTokenKeyfileDialogBase : public wxDialog { private: - + protected: wxChoice* SecurityTokenChoice; wxTextCtrl* KeyfileNameTextCtrl; wxStdDialogButtonSizer* StdButtons; wxButton* StdButtonsOK; wxButton* StdButtonsCancel; - + // Virtual event handlers, overide them in your derived class virtual void OnKeyfileNameChanged( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - NewSecurityTokenKeyfileDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("New Security Token Keyfile Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + NewSecurityTokenKeyfileDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("New Security Token Keyfile Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~NewSecurityTokenKeyfileDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class PreferencesDialogBase /////////////////////////////////////////////////////////////////////////////// - class PreferencesDialogBase : public wxDialog + class PreferencesDialogBase : public wxDialog { private: - + protected: wxNotebook* PreferencesNotebook; wxPanel* SecurityPage; @@ -598,7 +599,7 @@ namespace VeraCrypt wxStdDialogButtonSizer* StdButtons; wxButton* StdButtonsOK; wxButton* StdButtonsCancel; - + // Virtual event handlers, overide them in your derived class virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } virtual void OnDismountOnScreenSaverCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } @@ -615,26 +616,26 @@ namespace VeraCrypt virtual void OnRemoveHotkeyButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: wxPanel* DefaultMountOptionsPage; wxPanel* DefaultKeyfilesPage; wxPanel* SecurityTokensPage; wxPanel* HotkeysPage; - - PreferencesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Preferences"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + PreferencesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Preferences"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~PreferencesDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class RandomPoolEnrichmentDialogBase /////////////////////////////////////////////////////////////////////////////// - class RandomPoolEnrichmentDialogBase : public wxDialog + class RandomPoolEnrichmentDialogBase : public wxDialog { private: - + protected: wxBoxSizer* MainSizer; wxChoice* HashChoice; @@ -643,27 +644,27 @@ namespace VeraCrypt wxGauge* CollectedEntropy; wxStaticText* MouseStaticText; wxButton* ContinueButton; - + // Virtual event handlers, overide them in your derived class virtual void OnMouseMotion( wxMouseEvent& event ) { event.Skip(); } virtual void OnHashSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnShowRandomPoolCheckBoxClicked( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - RandomPoolEnrichmentDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("VeraCrypt - Random Pool Enrichment"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + RandomPoolEnrichmentDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("VeraCrypt - Random Pool Enrichment"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~RandomPoolEnrichmentDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class SecurityTokenKeyfilesDialogBase /////////////////////////////////////////////////////////////////////////////// - class SecurityTokenKeyfilesDialogBase : public wxDialog + class SecurityTokenKeyfilesDialogBase : public wxDialog { private: - + protected: wxListCtrl* SecurityTokenKeyfileListCtrl; wxButton* ExportButton; @@ -671,7 +672,7 @@ namespace VeraCrypt wxButton* ImportButton; wxButton* OKButton; wxButton* CancelButton; - + // Virtual event handlers, overide them in your derived class virtual void OnListItemActivated( wxListEvent& event ) { event.Skip(); } virtual void OnListItemDeselected( wxListEvent& event ) { event.Skip(); } @@ -680,41 +681,41 @@ namespace VeraCrypt virtual void OnDeleteButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnImportButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - SecurityTokenKeyfilesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Security Token Keyfiles"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + + SecurityTokenKeyfilesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Security Token Keyfiles"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); ~SecurityTokenKeyfilesDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class VolumePropertiesDialogBase /////////////////////////////////////////////////////////////////////////////// - class VolumePropertiesDialogBase : public wxDialog + class VolumePropertiesDialogBase : public wxDialog { private: - + protected: wxListCtrl* PropertiesListCtrl; wxStdDialogButtonSizer* StdButtons; wxButton* StdButtonsOK; - + public: - - VolumePropertiesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Volume Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); + + VolumePropertiesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Volume Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); ~VolumePropertiesDialogBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class EncryptionOptionsWizardPageBase /////////////////////////////////////////////////////////////////////////////// class EncryptionOptionsWizardPageBase : public WizardPage { private: - + protected: wxChoice* EncryptionAlgorithmChoice; wxButton* TestButton; @@ -723,47 +724,47 @@ namespace VeraCrypt wxButton* BenchmarkButton; wxChoice* HashChoice; wxHyperlinkCtrl* HashHyperlink; - + // Virtual event handlers, overide them in your derived class virtual void OnEncryptionAlgorithmSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnTestButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnEncryptionAlgorithmHyperlinkClick( wxHyperlinkEvent& event ) { event.Skip(); } virtual void OnBenchmarkButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnHashHyperlinkClick( wxHyperlinkEvent& event ) { event.Skip(); } - - + + public: - - EncryptionOptionsWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + EncryptionOptionsWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~EncryptionOptionsWizardPageBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class InfoWizardPageBase /////////////////////////////////////////////////////////////////////////////// class InfoWizardPageBase : public WizardPage { private: - + protected: wxBoxSizer* InfoPageSizer; wxStaticText* InfoStaticText; - + public: - - InfoWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + InfoWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~InfoWizardPageBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class KeyfilesPanelBase /////////////////////////////////////////////////////////////////////////////// - class KeyfilesPanelBase : public wxPanel + class KeyfilesPanelBase : public wxPanel { private: - + protected: wxListCtrl* KeyfilesListCtrl; wxButton* AddFilesButton; @@ -771,7 +772,7 @@ namespace VeraCrypt wxButton* AddSecurityTokenSignatureButton; wxButton* RemoveButton; wxButton* RemoveAllButton; - + // Virtual event handlers, overide them in your derived class virtual void OnListItemDeselected( wxListEvent& event ) { event.Skip(); } virtual void OnListItemSelected( wxListEvent& event ) { event.Skip(); } @@ -781,89 +782,89 @@ namespace VeraCrypt virtual void OnAddSecurityTokenSignatureButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnRemoveButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnRemoveAllButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - KeyfilesPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + KeyfilesPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~KeyfilesPanelBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class ProgressWizardPageBase /////////////////////////////////////////////////////////////////////////////// class ProgressWizardPageBase : public WizardPage { private: - + protected: wxBoxSizer* ProgressSizer; wxGauge* ProgressGauge; wxButton* AbortButton; wxStaticText* InfoStaticText; - + // Virtual event handlers, overide them in your derived class virtual void OnAbortButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - ProgressWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + ProgressWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~ProgressWizardPageBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class SelectDirectoryWizardPageBase /////////////////////////////////////////////////////////////////////////////// class SelectDirectoryWizardPageBase : public WizardPage { private: - + protected: wxTextCtrl* DirectoryTextCtrl; wxButton* BrowseButton; wxStaticText* InfoStaticText; - + // Virtual event handlers, overide them in your derived class virtual void OnDirectoryTextChanged( wxCommandEvent& event ) { event.Skip(); } virtual void OnBrowseButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - SelectDirectoryWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + SelectDirectoryWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~SelectDirectoryWizardPageBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class SingleChoiceWizardPageBase /////////////////////////////////////////////////////////////////////////////// class SingleChoiceWizardPageBase : public WizardPage { private: - + protected: wxBoxSizer* OuterChoicesSizer; wxBoxSizer* ChoicesSizer; wxStaticText* InfoStaticText; - + public: - - SingleChoiceWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + SingleChoiceWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~SingleChoiceWizardPageBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class VolumeCreationProgressWizardPageBase /////////////////////////////////////////////////////////////////////////////// class VolumeCreationProgressWizardPageBase : public WizardPage { private: - + protected: wxBoxSizer* KeySamplesUpperSizer; wxBoxSizer* KeySamplesUpperInnerSizer; @@ -884,79 +885,79 @@ namespace VeraCrypt wxPanel* m_panel122; wxStaticText* TimeLeftStaticText; wxStaticText* InfoStaticText; - + // Virtual event handlers, overide them in your derived class virtual void OnDisplayKeysCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnAbortButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - VolumeCreationProgressWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + VolumeCreationProgressWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~VolumeCreationProgressWizardPageBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class VolumeLocationWizardPageBase /////////////////////////////////////////////////////////////////////////////// class VolumeLocationWizardPageBase : public WizardPage { private: - + protected: wxComboBox* VolumePathComboBox; wxButton* SelectFileButton; wxButton* SelectDeviceButton; wxCheckBox* NoHistoryCheckBox; wxStaticText* InfoStaticText; - + // Virtual event handlers, overide them in your derived class virtual void OnVolumePathTextChanged( wxCommandEvent& event ) { event.Skip(); } virtual void OnSelectFileButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnSelectDeviceButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnNoHistoryCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - VolumeLocationWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + VolumeLocationWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~VolumeLocationWizardPageBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class VolumeFormatOptionsWizardPageBase /////////////////////////////////////////////////////////////////////////////// class VolumeFormatOptionsWizardPageBase : public WizardPage { private: - + protected: wxStaticText* m_staticText43; wxChoice* FilesystemTypeChoice; wxCheckBox* QuickFormatCheckBox; wxStaticText* InfoStaticText; - + // Virtual event handlers, overide them in your derived class virtual void OnFilesystemTypeSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnQuickFormatCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - VolumeFormatOptionsWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + VolumeFormatOptionsWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~VolumeFormatOptionsWizardPageBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class VolumePasswordPanelBase /////////////////////////////////////////////////////////////////////////////// - class VolumePasswordPanelBase : public wxPanel + class VolumePasswordPanelBase : public wxPanel { private: - + protected: wxGridBagSizer* GridBagSizer; wxStaticText* PasswordStaticText; @@ -978,7 +979,7 @@ namespace VeraCrypt wxStaticText* HeaderWipeCountText; wxChoice* HeaderWipeCount; wxBoxSizer* PasswordPlaceholderSizer; - + // Virtual event handlers, overide them in your derived class virtual void OnTextChanged( wxCommandEvent& event ) { event.Skip(); } virtual void OnPimChanged( wxCommandEvent& event ) { event.Skip(); } @@ -989,40 +990,40 @@ namespace VeraCrypt virtual void OnKeyfilesButtonRightDown( wxMouseEvent& event ) { event.Skip(); } virtual void OnKeyfilesButtonRightClick( wxMouseEvent& event ) { event.Skip(); } virtual void OnTrueCryptModeChecked( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - VolumePasswordPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + VolumePasswordPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~VolumePasswordPanelBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class VolumePasswordWizardPageBase /////////////////////////////////////////////////////////////////////////////// class VolumePasswordWizardPageBase : public WizardPage { private: - + protected: wxBoxSizer* PasswordPanelSizer; wxStaticText* InfoStaticText; - + public: - - VolumePasswordWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + VolumePasswordWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~VolumePasswordWizardPageBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class VolumePimWizardPageBase /////////////////////////////////////////////////////////////////////////////// class VolumePimWizardPageBase : public WizardPage { private: - + protected: wxBoxSizer* PimPanelSizer; wxBoxSizer* PimSizer; @@ -1031,67 +1032,67 @@ namespace VeraCrypt wxStaticText* VolumePimHelpStaticText; wxCheckBox* DisplayPimCheckBox; wxStaticText* InfoStaticText; - + // Virtual event handlers, overide them in your derived class virtual void OnPimChanged( wxCommandEvent& event ) { event.Skip(); } virtual void OnDisplayPimCheckBoxClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - VolumePimWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + VolumePimWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~VolumePimWizardPageBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class VolumeSizeWizardPageBase /////////////////////////////////////////////////////////////////////////////// class VolumeSizeWizardPageBase : public WizardPage { private: - + protected: wxTextCtrl* VolumeSizeTextCtrl; wxChoice* VolumeSizePrefixChoice; wxStaticText* FreeSpaceStaticText; wxStaticText* InfoStaticText; - + // Virtual event handlers, overide them in your derived class virtual void OnVolumeSizeTextChanged( wxCommandEvent& event ) { event.Skip(); } virtual void OnVolumeSizePrefixSelected( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - VolumeSizeWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); + + VolumeSizeWizardPageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL ); ~VolumeSizeWizardPageBase(); - + }; - + /////////////////////////////////////////////////////////////////////////////// /// Class WaitDialogBase /////////////////////////////////////////////////////////////////////////////// - class WaitDialogBase : public wxDialog + class WaitDialogBase : public wxDialog { private: - + protected: wxStaticText* WaitStaticText; wxGauge* WaitProgessBar; - + // Virtual event handlers, overide them in your derived class virtual void OnWaitDialogClose( wxCloseEvent& event ) { event.Skip(); } virtual void OnWaitDialogInit( wxInitDialogEvent& event ) { event.Skip(); } - - + + public: - - WaitDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("VeraCrypt"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION ); + + WaitDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("VeraCrypt"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION ); ~WaitDialogBase(); - + }; - + } // namespace VeraCrypt #endif //__FORMS_H__ diff --git a/src/Main/Forms/MountOptionsDialog.cpp b/src/Main/Forms/MountOptionsDialog.cpp index c33cf9fe..815cd523 100644 --- a/src/Main/Forms/MountOptionsDialog.cpp +++ b/src/Main/Forms/MountOptionsDialog.cpp @@ -81,6 +81,7 @@ namespace VeraCrypt FilesystemOptionsTextCtrl->SetValue (Options.FilesystemOptions); ReadOnlyCheckBox->SetValue (Options.Protection == VolumeProtection::ReadOnly); + BackupHeaderCheckBox->SetValidator (wxGenericValidator (&Options.UseBackupHeaders)); ProtectionCheckBox->SetValue (Options.Protection == VolumeProtection::HiddenVolumeReadOnly); OptionsButtonLabel = OptionsButton->GetLabel(); diff --git a/src/Main/Forms/TrueCrypt.fbp b/src/Main/Forms/TrueCrypt.fbp index a74a2a5b..0b40c527 100644 --- a/src/Main/Forms/TrueCrypt.fbp +++ b/src/Main/Forms/TrueCrypt.fbp @@ -11618,6 +11618,94 @@ + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Use backup header embedded in &volume if available + + 0 + + + 0 + + 1 + BackupHeaderCheckBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxALL -- cgit v1.2.3