VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/VolumePasswordPanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/Forms/VolumePasswordPanel.cpp')
-rw-r--r--src/Main/Forms/VolumePasswordPanel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Main/Forms/VolumePasswordPanel.cpp b/src/Main/Forms/VolumePasswordPanel.cpp
index bb1f0c78..3525abf5 100644
--- a/src/Main/Forms/VolumePasswordPanel.cpp
+++ b/src/Main/Forms/VolumePasswordPanel.cpp
@@ -440,73 +440,73 @@ namespace VeraCrypt
void VolumePasswordPanel::OnKeyfilesButtonRightDown (wxMouseEvent& event)
{
#ifndef TC_MACOSX
event.Skip();
#endif
}
bool VolumePasswordPanel::PasswordsMatch () const
{
assert (ConfirmPasswordStaticText->IsShown());
try
{
return *GetPassword (PasswordTextCtrl) == *GetPassword (ConfirmPasswordTextCtrl);
}
catch (PasswordException&)
{
return false;
}
}
void VolumePasswordPanel::WipeTextCtrl (wxTextCtrl *textCtrl)
{
textCtrl->SetValue (wxString (L'X', textCtrl->GetLineLength(0)));
GetPassword (textCtrl);
}
bool VolumePasswordPanel::UpdatePimHelpText (bool pimChanged)
{
bool guiUpdated = false;
if (pimChanged && VolumePimHelpStaticText->GetForegroundColour() != *wxRED)
{
VolumePimHelpStaticText->SetForegroundColour(*wxRED);
VolumePimHelpStaticText->SetLabel(LangString["PIM_CHANGE_WARNING"]);
guiUpdated = true;
}
- if (!pimChanged && VolumePimHelpStaticText->GetForegroundColour() != *wxBLACK)
+ if (!pimChanged && VolumePimHelpStaticText->GetForegroundColour() != wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT))
{
- VolumePimHelpStaticText->SetForegroundColour(*wxBLACK);
+ VolumePimHelpStaticText->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
VolumePimHelpStaticText->SetLabel(LangString["IDC_PIM_HELP"]);
guiUpdated = true;
}
if (guiUpdated)
{
Layout();
Fit();
GetParent()->Layout();
GetParent()->Fit();
}
return guiUpdated;
}
void VolumePasswordPanel::OnUsePimCheckBoxClick( wxCommandEvent& event )
{
if (EnablePimEntry)
{
wxWindow* layoutParent = TopOwnerParent? TopOwnerParent : GetParent();
PimCheckBox->Show (false);
VolumePimStaticText->Show (true);
VolumePimTextCtrl->Show (true);
VolumePimHelpStaticText->Show (true);
if (DisplayPasswordCheckBox->IsChecked ())
DisplayPassword (true, &VolumePimTextCtrl, 3);
else
{
Layout();
Fit();
}
layoutParent->Layout();
layoutParent->Fit();
}