Annotation of truecrypt/main/forms/volumeformatoptionswizardpage.cpp, revision 1.1.1.1

1.1       root        1: /*
                      2:  Copyright (c) 2008 TrueCrypt Foundation. All rights reserved.
                      3: 
                      4:  Governed by the TrueCrypt License 2.4 the full text of which is contained
                      5:  in the file License.txt included in TrueCrypt binary and source code
                      6:  distribution packages.
                      7: */
                      8: 
                      9: #include "System.h"
                     10: #include "Main/GraphicUserInterface.h"
                     11: #include "VolumeFormatOptionsWizardPage.h"
                     12: 
                     13: namespace TrueCrypt
                     14: {
                     15:        VolumeFormatOptionsWizardPage::VolumeFormatOptionsWizardPage (wxPanel* parent, const VolumePath &volumePath)
                     16:                : VolumeFormatOptionsWizardPageBase (parent)
                     17:        {
                     18:                InfoStaticText->SetLabel (_(
                     19:                        "In order to enable your operating system to mount your new volume, it has to be formatted with a filesystem. Please select a filesystem type.\n\nIf your volume is going to be hosted on a device or partition, you can use 'Quick format' to skip encryption of free space of the volume."));
                     20: 
                     21:                FilesystemTypeChoice->Append (L"FAT");
                     22:                FilesystemTypeChoice->Append (LangString["NONE"]);
                     23:                QuickFormatCheckBox->Enable (volumePath.IsDevice());
                     24:        }
                     25: 
                     26:        VolumeCreationOptions::FilesystemType::Enum VolumeFormatOptionsWizardPage::GetFilesystemType () const
                     27:        {
                     28:                if (FilesystemTypeChoice->GetSelection() == 0)
                     29:                        return VolumeCreationOptions::FilesystemType::FAT;
                     30: 
                     31:                return VolumeCreationOptions::FilesystemType::None;
                     32:        }
                     33: 
                     34:        void VolumeFormatOptionsWizardPage::OnFilesystemTypeSelected (wxCommandEvent& event)
                     35:        {
                     36:        }
                     37: 
                     38:        void VolumeFormatOptionsWizardPage::OnQuickFormatCheckBoxClick (wxCommandEvent& event)
                     39:        {
                     40:                if (event.IsChecked())
                     41:                {
                     42:                        QuickFormatCheckBox->SetValue (Gui->AskYesNo (LangString["WARN_QUICK_FORMAT"], false, true));
                     43:                }
                     44:        }
                     45: 
                     46:        void VolumeFormatOptionsWizardPage::SetFilesystemType (VolumeCreationOptions::FilesystemType::Enum type)
                     47:        {
                     48:                switch (type)
                     49:                {
                     50:                case VolumeCreationOptions::FilesystemType::FAT:
                     51:                        FilesystemTypeChoice->SetStringSelection (L"FAT");
                     52:                        break;
                     53: 
                     54:                case VolumeCreationOptions::FilesystemType::None:
                     55:                        FilesystemTypeChoice->SetStringSelection (L"NONE");
                     56:                        break;
                     57: 
                     58:                default:
                     59:                        throw ParameterIncorrect (SRC_POS);
                     60:                }
                     61:        }
                     62: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.