diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-04-06 18:58:47 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-04-06 19:50:27 +0200 |
commit | 4a8040735b800ec016c1a7e24292e24579dbabd8 (patch) | |
tree | 5b5ff4ce114cce985fe2d6717d95068ca72e378f /src/Main/GraphicUserInterface.cpp | |
parent | ae28d510163d6108f3746ee1e5d64d00350ac8ee (diff) | |
download | VeraCrypt-4a8040735b800ec016c1a7e24292e24579dbabd8.tar.gz VeraCrypt-4a8040735b800ec016c1a7e24292e24579dbabd8.zip |
MacOSX: Correctly handle OSX dock "reopen-application" event and Cocoa openFiles message instead of the deprecated Carbon "open-document" event
Diffstat (limited to 'src/Main/GraphicUserInterface.cpp')
-rw-r--r-- | src/Main/GraphicUserInterface.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index c29eef22..3b4da416 100644 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -622,10 +622,20 @@ namespace VeraCrypt } #ifdef TC_MACOSX - void GraphicUserInterface::MacOpenFile (const wxString &fileName) + void GraphicUserInterface::MacOpenFiles (const wxArrayString &fileNames) { - OpenVolumeSystemRequestEventArgs eventArgs (fileName); - OpenVolumeSystemRequestEvent.Raise (eventArgs); + if (fileNames.GetCount() > 0) + { + // we can only put one volume path at a time on the text field + // so we take the first on the list + OpenVolumeSystemRequestEventArgs eventArgs (fileNames[0]); + OpenVolumeSystemRequestEvent.Raise (eventArgs); + } + } + + void GraphicUserInterface::MacReopenApp () + { + SetBackgroundMode (false); } #endif |