diff options
Diffstat (limited to 'src/Main/Forms/MainFrame.cpp')
-rw-r--r-- | src/Main/Forms/MainFrame.cpp | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp index ab42ac06..07b876ac 100644 --- a/src/Main/Forms/MainFrame.cpp +++ b/src/Main/Forms/MainFrame.cpp @@ -642,13 +642,9 @@ namespace VeraCrypt try { MountOptions mountOptions (GetPreferences().DefaultMountOptions); - if (CmdLine->ArgTrueCryptMode) - { - mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode; - } if (CmdLine->ArgHash) { - mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, mountOptions.TrueCryptMode); + mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash); } if (CmdLine->ArgPim > 0) { @@ -671,19 +667,15 @@ namespace VeraCrypt try { MountOptions mountOptions (GetPreferences().DefaultMountOptions); - if (CmdLine->ArgTrueCryptMode) - { - mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode; - } if (CmdLine->ArgHash) { - mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, mountOptions.TrueCryptMode); + mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash); } if (CmdLine->ArgPim > 0) { mountOptions.Pim = CmdLine->ArgPim; } - + mountOptions.EMVSupportEnabled = GetPreferences().EMVSupportEnabled; Gui->MountAllFavoriteVolumes (mountOptions); } catch (exception &e) @@ -706,18 +698,15 @@ namespace VeraCrypt MountOptions mountOptions (GetPreferences().DefaultMountOptions); mountOptions.SlotNumber = SelectedSlotNumber; mountOptions.Path = GetSelectedVolumePath(); - if (CmdLine->ArgTrueCryptMode) - { - mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode; - } if (CmdLine->ArgHash) { - mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, mountOptions.TrueCryptMode); + mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash); } if (CmdLine->ArgPim > 0) { mountOptions.Pim = CmdLine->ArgPim; } + mountOptions.EMVSupportEnabled = GetPreferences().EMVSupportEnabled; try { @@ -748,6 +737,7 @@ namespace VeraCrypt #ifdef TC_MACOSX if (event.GetActive() && Gui->IsInBackgroundMode()) Gui->SetBackgroundMode (false); + EnsureVisible(); #endif event.Skip(); } @@ -963,13 +953,9 @@ namespace VeraCrypt SetVolumePath (favorite.Path); MountOptions mountOptions (GetPreferences().DefaultMountOptions); - if (CmdLine->ArgTrueCryptMode) - { - mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode; - } if (CmdLine->ArgHash) { - mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, mountOptions.TrueCryptMode); + mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash); } if (CmdLine->ArgPim > 0) { @@ -1082,6 +1068,17 @@ namespace VeraCrypt dialog.ShowModal(); } + void MainFrame::OnLanguageMenuItemSelected (wxCommandEvent& event) + { +#ifdef TC_MACOSX + if (Gui->IsInBackgroundMode()) + Gui->SetBackgroundMode (false); +#endif + PreferencesDialog dialog (this); + dialog.SelectPage (dialog.LanguagesPage); + dialog.ShowModal(); + } + void MainFrame::OnLegalNoticesMenuItemSelected (wxCommandEvent& event) { #ifdef TC_MACOSX @@ -1705,7 +1702,7 @@ namespace VeraCrypt #endif fields[ColumnPath] = volume->Path; fields[ColumnSize] = Gui->SizeToString (volume->Size); - fields[ColumnType] = Gui->VolumeTypeToString (volume->Type, volume->TrueCryptMode, volume->Protection); + fields[ColumnType] = Gui->VolumeTypeToString (volume->Type, volume->Protection); if (volume->HiddenVolumeProtectionTriggered) { @@ -1715,7 +1712,7 @@ namespace VeraCrypt bool slotUpdated = false; if (itemIndex == -1) { - Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex, fields, 0, (void *) volume->SlotNumber); + Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex, fields, 0, (void *)(intptr_t) volume->SlotNumber); OnListItemInserted (prevItemIndex); listChanged |= true; @@ -1750,7 +1747,7 @@ namespace VeraCrypt { if (itemIndex == -1) { - Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex, fields, 0, (void *) slotNumber); + Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex, fields, 0, (void *)(intptr_t) slotNumber); OnListItemInserted (prevItemIndex); listChanged |= true; } |