]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/dirdlg.cpp
Misc XRC format docs corrections.
[wxWidgets.git] / src / osx / carbon / dirdlg.cpp
index 157e07845d3dd2340de948527264266d3cf6d47e..b6cc8a45ef1ad94ec6b2b710c2bd449aa097b505 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     1998-01-01
-// RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
     #include "wx/dialog.h"
-    #include "wx/cmndata.h"
 #endif // WX_PRECOMP
 
 #include "wx/filename.h"
+#include "wx/modalhook.h"
 
 #include "wx/osx/private.h"
 
@@ -55,7 +54,11 @@ static pascal void NavEventProc(
     }
 }
 
-wxDirDialog::wxDirDialog(wxWindow *parent,
+void wxDirDialog::Init()
+{
+}
+
+void wxDirDialog::Create(wxWindow *parent,
                          const wxString& message,
                          const wxString& defaultPath,
                          long style,
@@ -73,6 +76,8 @@ wxDirDialog::wxDirDialog(wxWindow *parent,
 
 int wxDirDialog::ShowModal()
 {
+    WX_HOOK_MODAL_DIALOG();
+
     NavDialogRef dialog = NULL;
     NavDialogCreationOptions options;
     NavReplyRecord reply ;
@@ -88,7 +93,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);
@@ -132,8 +139,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 ;
 }