mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -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:
@@ -622,11 +622,21 @@ namespace VeraCrypt
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TC_MACOSX
|
#ifdef TC_MACOSX
|
||||||
void GraphicUserInterface::MacOpenFile (const wxString &fileName)
|
void GraphicUserInterface::MacOpenFiles (const wxArrayString &fileNames)
|
||||||
{
|
{
|
||||||
OpenVolumeSystemRequestEventArgs eventArgs (fileName);
|
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);
|
OpenVolumeSystemRequestEvent.Raise (eventArgs);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphicUserInterface::MacReopenApp ()
|
||||||
|
{
|
||||||
|
SetBackgroundMode (false);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void GraphicUserInterface::MoveListCtrlItem (wxListCtrl *listCtrl, long itemIndex, long newItemIndex) const
|
void GraphicUserInterface::MoveListCtrlItem (wxListCtrl *listCtrl, long itemIndex, long newItemIndex) const
|
||||||
|
|||||||
@@ -94,7 +94,8 @@ namespace VeraCrypt
|
|||||||
void ExecuteWaitThreadRoutine (wxWindow *parent, WaitThreadRoutine *pRoutine) const;
|
void ExecuteWaitThreadRoutine (wxWindow *parent, WaitThreadRoutine *pRoutine) const;
|
||||||
|
|
||||||
#ifdef TC_MACOSX
|
#ifdef TC_MACOSX
|
||||||
virtual void MacOpenFile (const wxString &fileName);
|
virtual void MacOpenFiles (const wxArrayString &fileNames);
|
||||||
|
virtual void MacReopenApp ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|||||||
Reference in New Issue
Block a user