mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Linux/MacOSX: Fix hidden volume settings not correctly displayed when enabling hidden volume protection in mount options window
This commit is contained in:
@@ -88,7 +88,8 @@ namespace VeraCrypt
|
|||||||
OptionsButton->SetLabel (OptionsButtonLabel + L" >");
|
OptionsButton->SetLabel (OptionsButtonLabel + L" >");
|
||||||
OptionsPanel->Show (false);
|
OptionsPanel->Show (false);
|
||||||
|
|
||||||
ProtectionPasswordPanel = new VolumePasswordPanel (OptionsPanel, &options, options.ProtectionPassword, true, options.ProtectionKeyfiles, false, true, true, false, true, true, LangString["IDT_HIDDEN_PROT_PASSWD"]);
|
ProtectionPasswordPanel = new VolumePasswordPanel (ProtectionSizer->GetStaticBox(), &options, options.ProtectionPassword, true, options.ProtectionKeyfiles, false, true, true, false, true, true, LangString["IDT_HIDDEN_PROT_PASSWD"]);
|
||||||
|
ProtectionPasswordPanel->TopOwnerParent = this;
|
||||||
ProtectionPasswordSizer->Add (ProtectionPasswordPanel, 1, wxALL | wxEXPAND);
|
ProtectionPasswordSizer->Add (ProtectionPasswordPanel, 1, wxALL | wxEXPAND);
|
||||||
|
|
||||||
UpdateDialog();
|
UpdateDialog();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
namespace VeraCrypt
|
namespace VeraCrypt
|
||||||
{
|
{
|
||||||
VolumePasswordPanel::VolumePasswordPanel (wxWindow* parent, MountOptions* options, shared_ptr <VolumePassword> password, bool disableTruecryptMode, shared_ptr <KeyfileList> keyfiles, bool enableCache, bool enablePassword, bool enableKeyfiles, bool enableConfirmation, bool enablePkcs5Prf, bool isMountPassword, const wxString &passwordLabel)
|
VolumePasswordPanel::VolumePasswordPanel (wxWindow* parent, MountOptions* options, shared_ptr <VolumePassword> password, bool disableTruecryptMode, shared_ptr <KeyfileList> keyfiles, bool enableCache, bool enablePassword, bool enableKeyfiles, bool enableConfirmation, bool enablePkcs5Prf, bool isMountPassword, const wxString &passwordLabel)
|
||||||
: VolumePasswordPanelBase (parent), Keyfiles (new KeyfileList), EnablePimEntry (true)
|
: VolumePasswordPanelBase (parent), TopOwnerParent(NULL), Keyfiles (new KeyfileList), EnablePimEntry (true)
|
||||||
{
|
{
|
||||||
size_t maxPasswordLength = CmdLine->ArgUseLegacyPassword? VolumePassword::MaxLegacySize : VolumePassword::MaxSize;
|
size_t maxPasswordLength = CmdLine->ArgUseLegacyPassword? VolumePassword::MaxLegacySize : VolumePassword::MaxSize;
|
||||||
if (keyfiles)
|
if (keyfiles)
|
||||||
@@ -493,6 +493,7 @@ namespace VeraCrypt
|
|||||||
{
|
{
|
||||||
if (EnablePimEntry)
|
if (EnablePimEntry)
|
||||||
{
|
{
|
||||||
|
wxWindow* layoutParent = TopOwnerParent? TopOwnerParent : GetParent();
|
||||||
PimCheckBox->Show (false);
|
PimCheckBox->Show (false);
|
||||||
VolumePimStaticText->Show (true);
|
VolumePimStaticText->Show (true);
|
||||||
VolumePimTextCtrl->Show (true);
|
VolumePimTextCtrl->Show (true);
|
||||||
@@ -506,8 +507,8 @@ namespace VeraCrypt
|
|||||||
Fit();
|
Fit();
|
||||||
}
|
}
|
||||||
|
|
||||||
GetParent()->Layout();
|
layoutParent->Layout();
|
||||||
GetParent()->Fit();
|
layoutParent->Fit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ namespace VeraCrypt
|
|||||||
bool UpdatePimHelpText (bool pimChanged);
|
bool UpdatePimHelpText (bool pimChanged);
|
||||||
|
|
||||||
Event UpdateEvent;
|
Event UpdateEvent;
|
||||||
|
wxWindow* TopOwnerParent; // use to handle layout when embedded inside sizer child
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void SetPimValidator ();
|
void SetPimValidator ();
|
||||||
|
|||||||
Reference in New Issue
Block a user