VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms
AgeCommit message (Expand)AuthorFilesLines
2014-12-28Linux/MacOSX: Add possibility to choose 1-pass wipe mode without changing the...Mounir IDRASSI2-4/+4
2014-12-26Linux/MacOSX: Implement waiting dialog for lengthy operations in order to hav...Mounir IDRASSI10-9/+530
2014-12-20Linux/MacOSX: Add a donation menu entryMounir IDRASSI4-0/+23
2014-12-19Linux/MacOSX: Enhance performance by implementing the possibility to choose t...Mounir IDRASSI8-11/+22
2014-12-11Linux/macOSX: always display random gathering dialog/interface before perform...Mounir IDRASSI1-0/+2
2014-12-11Linux/MacOSX: Implement generating more than one keyfile, specifying the size...Mounir IDRASSI5-11/+947
2014-12-07MacOSX/Linux: Solve truncated text in some Wizard windows by defining a large...VeraCrypt_1.0f-BETA2Mounir IDRASSI3-9/+9
2014-11-08Replace deprecated wxTextValidator::SetBellOnError whose logic whose inverted...Mounir IDRASSI1-2/+4
2014-11-08Linux/MacOSX: Remove static size values from GUI in order to let wxWidgets ca...Mounir IDRASSI3-11/+20
2014-11-08Linux: Support NTFS formatting of volume. We use mkfs.ntfs so it needs to be ...Mounir IDRASSI2-0/+2
2014-11-08MacOSX : correct compilation issue caused by system API deprication and use o...Mounir IDRASSI1-1/+1
2014-11-08Linux GUI : hide the wipe choice during volume creation. Remove extra content...Mounir IDRASSI3-3/+5
2014-11-08Correct compilation error under Linux introduced in latest commitMounir IDRASSI1-1/+1
2014-11-08Linux/MacOSX port of manual selection of number of passes for volume header o...Mounir IDRASSI6-3/+210
2014-11-08Change namespace from TrueCrypt to VeraCrypt. Rename method from Resources Re...Mounir IDRASSI60-63/+63
2014-11-08Update wxFormBuild file to latest version (3.5 beta) and generate new Forms.c...Mounir IDRASSI3-4086/+12798
2014-11-08Change legacy version check in newly added Linux/MacOSX sources from 0x600 (T...Mounir IDRASSI1-2/+2
2014-11-08wxWidgets 3.0 compatibility modificationsMounir IDRASSI3-3/+3
2014-11-08Replace TrueCrypt references in added sources and resources by VeraCrypt ones.Mounir IDRASSI8-33/+33
2014-11-08Add TrueCrypt 7.1a MacOSX/Linux specific source files.Mounir IDRASSI63-0/+29240
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) and all other portions of this file are Copyright (c) 2013-2017 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 code distribution packages. */ #include "System.h" #include "Application.h" #include "FavoriteVolume.h" #include "Xml.h" namespace VeraCrypt { FavoriteVolumeList FavoriteVolume::LoadList () { FavoriteVolumeList favorites; FilePath path = Application::GetConfigFilePath (GetFileName()); if (path.IsFile()) { foreach (XmlNode node, XmlParser (path).GetNodes (L"volume")) { VolumeSlotNumber slotNumber = 0; wstring attr = wstring (node.Attributes[L"slotnumber"]); if (!attr.empty()) slotNumber = StringConverter::ToUInt64 (attr); bool readOnly = false; attr = wstring (node.Attributes[L"readonly"]); if (!attr.empty()) readOnly = (StringConverter::ToUInt32 (attr) != 0 ? true : false); bool system = false; attr = wstring (node.Attributes[L"system"]); if (!attr.empty()) system = (StringConverter::ToUInt32 (attr) != 0 ? true : false); favorites.push_back (shared_ptr <FavoriteVolume> ( new FavoriteVolume ((wstring) node.InnerText, wstring (node.Attributes[L"mountpoint"]), slotNumber, readOnly, system))); } } return favorites; } void FavoriteVolume::SaveList (const FavoriteVolumeList &favorites) { FilePath favoritesCfgPath = Application::GetConfigFilePath (GetFileName(), true); if (favorites.empty()) { if (favoritesCfgPath.IsFile()) favoritesCfgPath.Delete(); } else { XmlNode favoritesXml (L"favorites"); foreach_ref (const FavoriteVolume &favorite, favorites) { XmlNode node (L"volume", wstring (favorite.Path)); node.Attributes[L"mountpoint"] = wstring (favorite.MountPoint); node.Attributes[L"slotnumber"] = StringConverter::FromNumber (favorite.SlotNumber); node.Attributes[L"readonly"] = StringConverter::FromNumber (favorite.ReadOnly ? 1 : 0); node.Attributes[L"system"] = StringConverter::FromNumber (favorite.System ? 1 : 0); favoritesXml.InnerNodes.push_back (node); } XmlWriter favoritesWriter (favoritesCfgPath); favoritesWriter.WriteNode (favoritesXml); favoritesWriter.Close(); } } void FavoriteVolume::ToMountOptions (MountOptions &options) const { if (MountPoint.IsEmpty()) { options.MountPoint.reset(); options.NoFilesystem = true; } else options.MountPoint.reset (new DirectoryPath (MountPoint)); options.Path.reset (new VolumePath (Path)); options.PartitionInSystemEncryptionScope = System; options.Protection = (ReadOnly ? VolumeProtection::ReadOnly : VolumeProtection::None); options.SlotNumber = SlotNumber; } }