X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2680ced12cbbed16990007c5fa3ea7730700122..c9ed413ab4f5673ffff00198dc6ce1397398bda4:/src/osx/carbon/dirdlg.cpp?ds=sidebyside diff --git a/src/osx/carbon/dirdlg.cpp b/src/osx/carbon/dirdlg.cpp index e3f1a95ba6..1d3c058597 100644 --- a/src/osx/carbon/dirdlg.cpp +++ b/src/osx/carbon/dirdlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/dirdlg.cpp +// Name: src/osx/carbon/dirdlg.cpp // Purpose: wxDirDialog // Author: Stefan Csomor // Modified by: @@ -18,19 +18,12 @@ #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/dialog.h" - #include "wx/cmndata.h" #endif // WX_PRECOMP #include "wx/filename.h" #include "wx/osx/private.h" -#ifdef __DARWIN__ - #include -#else - #include -#endif - IMPLEMENT_CLASS(wxDirDialog, wxDialog) static pascal void NavEventProc( @@ -64,15 +57,17 @@ static pascal void NavEventProc( wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, const wxString& defaultPath, - long WXUNUSED(style), + long style, const wxPoint& WXUNUSED(pos), const wxSize& WXUNUSED(size), const wxString& WXUNUSED(name)) { wxASSERT_MSG( NavServicesAvailable() , wxT("Navigation Services are not running") ) ; - m_message = message; m_parent = parent; - m_path = defaultPath; + + SetMessage( message ); + SetWindowStyle(style); + SetPath(defaultPath); } int wxDirDialog::ShowModal() @@ -92,7 +87,9 @@ int wxDirDialog::ShowModal() err = NavCreateChooseFolderDialog(&options, sStandardNavEventFilter , NULL, this , &dialog); if (err == noErr) { + wxDialog::OSXBeginModalDialog(); err = NavDialogRun(dialog); + wxDialog::OSXEndModalDialog(); if ( err == noErr ) { err = NavDialogGetReply(dialog, &reply); @@ -136,8 +133,8 @@ int wxDirDialog::ShowModal() if ( err != noErr && err != userCanceledErr ) m_path = wxEmptyString ; - if ( dialog ) - ::NavDialogDispose(dialog); + if ( dialog ) + ::NavDialogDispose(dialog); return (err == noErr) ? wxID_OK : wxID_CANCEL ; }