]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/dirdlg.cpp
Document lack of wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK under OS X.
[wxWidgets.git] / src / osx / carbon / dirdlg.cpp
index e3f1a95ba6f2311a7a3110d8af1c75d4febe27d0..4f98aa02da956540ea16cb6fb5a7b05a53d65a04 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/mac/carbon/dirdlg.cpp
+// Name:        src/osx/carbon/dirdlg.cpp
 // Purpose:     wxDirDialog
 // Author:      Stefan Csomor
 // Modified by:
 // Purpose:     wxDirDialog
 // Author:      Stefan Csomor
 // Modified by:
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
     #include "wx/dialog.h"
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
     #include "wx/dialog.h"
-    #include "wx/cmndata.h"
 #endif // WX_PRECOMP
 
 #include "wx/filename.h"
 #endif // WX_PRECOMP
 
 #include "wx/filename.h"
+#include "wx/testing.h"
 
 #include "wx/osx/private.h"
 
 
 #include "wx/osx/private.h"
 
-#ifdef __DARWIN__
-    #include <Carbon/Carbon.h>
-#else
-    #include <Navigation.h>
-#endif
-
 IMPLEMENT_CLASS(wxDirDialog, wxDialog)
 
 static pascal void NavEventProc(
 IMPLEMENT_CLASS(wxDirDialog, wxDialog)
 
 static pascal void NavEventProc(
@@ -64,19 +58,23 @@ static pascal void NavEventProc(
 wxDirDialog::wxDirDialog(wxWindow *parent,
                          const wxString& message,
                          const wxString& defaultPath,
 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") ) ;
                          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_parent = parent;
-    m_path = defaultPath;
+
+    SetMessage( message );
+    SetWindowStyle(style);
+    SetPath(defaultPath);
 }
 
 int wxDirDialog::ShowModal()
 {
 }
 
 int wxDirDialog::ShowModal()
 {
+    WX_TESTING_SHOW_MODAL_HOOK();
+
     NavDialogRef dialog = NULL;
     NavDialogCreationOptions options;
     NavReplyRecord reply ;
     NavDialogRef dialog = NULL;
     NavDialogCreationOptions options;
     NavReplyRecord reply ;
@@ -92,7 +90,9 @@ int wxDirDialog::ShowModal()
         err = NavCreateChooseFolderDialog(&options, sStandardNavEventFilter , NULL,  this , &dialog);
         if (err == noErr)
         {
         err = NavCreateChooseFolderDialog(&options, sStandardNavEventFilter , NULL,  this , &dialog);
         if (err == noErr)
         {
+            wxDialog::OSXBeginModalDialog();
             err = NavDialogRun(dialog);
             err = NavDialogRun(dialog);
+            wxDialog::OSXEndModalDialog();
             if ( err == noErr )
             {
                 err = NavDialogGetReply(dialog, &reply);
             if ( err == noErr )
             {
                 err = NavDialogGetReply(dialog, &reply);
@@ -136,8 +136,8 @@ int wxDirDialog::ShowModal()
     if ( err != noErr && err != userCanceledErr )
         m_path = wxEmptyString ;
 
     if ( err != noErr && err != userCanceledErr )
         m_path = wxEmptyString ;
 
-       if ( dialog )
-       ::NavDialogDispose(dialog);
+    if ( dialog )
+        ::NavDialogDispose(dialog);
 
     return (err == noErr) ? wxID_OK : wxID_CANCEL ;
 }
 
     return (err == noErr) ? wxID_OK : wxID_CANCEL ;
 }