VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/ChangePasswordDialog.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2018-04-29 17:33:33 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2018-04-29 17:52:43 +0200
commite39f5fa5d6b1b09df16271cabb1dda5d42c0b980 (patch)
treecb3aff4a8c04c6b39c014a37e0683fd5b7817d94 /src/Main/Forms/ChangePasswordDialog.cpp
parent7a842266b3f2e69d1706aec3039b661e3a5b25dd (diff)
downloadVeraCrypt-e39f5fa5d6b1b09df16271cabb1dda5d42c0b980.tar.gz
VeraCrypt-e39f5fa5d6b1b09df16271cabb1dda5d42c0b980.zip
MacOSX: support pasting values to password fields using keyboard (CMD+V and CMD+A now working properly). This make using password managers with VeraCrypt easier.
Diffstat (limited to 'src/Main/Forms/ChangePasswordDialog.cpp')
-rw-r--r--src/Main/Forms/ChangePasswordDialog.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Main/Forms/ChangePasswordDialog.cpp b/src/Main/Forms/ChangePasswordDialog.cpp
index 2f8e1e47..819d9bf2 100644
--- a/src/Main/Forms/ChangePasswordDialog.cpp
+++ b/src/Main/Forms/ChangePasswordDialog.cpp
@@ -18,6 +18,17 @@
namespace VeraCrypt
{
+#ifdef TC_MACOSX
+
+ bool ChangePasswordDialog::ProcessEvent(wxEvent& event)
+ {
+ if(GraphicUserInterface::HandlePasswordEntryCustomEvent (event))
+ return true;
+ else
+ return ChangePasswordDialogBase::ProcessEvent(event);
+ }
+#endif
+
ChangePasswordDialog::ChangePasswordDialog (wxWindow* parent, shared_ptr <VolumePath> volumePath, Mode::Enum mode, shared_ptr <VolumePassword> password, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, shared_ptr <KeyfileList> newKeyfiles)
: ChangePasswordDialogBase (parent), DialogMode (mode), Path (volumePath)
{
@@ -57,6 +68,10 @@ namespace VeraCrypt
default:
throw ParameterIncorrect (SRC_POS);
}
+
+#ifdef TC_MACOSX
+ GraphicUserInterface::InstallPasswordEntryCustomKeyboardShortcuts (this);
+#endif
CurrentPasswordPanel = new VolumePasswordPanel (this, NULL, password, false, keyfiles, false, true, true, false, true, true);
CurrentPasswordPanel->UpdateEvent.Connect (EventConnector <ChangePasswordDialog> (this, &ChangePasswordDialog::OnPasswordPanelUpdate));