1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

MacOSX: Correctly handle OSX dock "reopen-application" event and Cocoa openFiles message instead of the deprecated Carbon "open-document" event

This commit is contained in:
Mounir IDRASSI
2015-04-06 18:58:47 +02:00
parent ae28d51016
commit 4a8040735b
2 changed files with 15 additions and 4 deletions

View File

@@ -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