]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/dirdlg.mm
Reflect changes in stc.cpp in stc.cpp.in from which it's generated.
[wxWidgets.git] / src / cocoa / dirdlg.mm
index e434dc60edcaa1a0df758eb408ab87769c783cdc..e0a066f359f65a3ab7cecde4c55ad85ff2434112 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Ryan Norton
 // Modified by: Hiroyuki Nakamura(maloninc)
 // Created:     2006-01-10
 // Author:      Ryan Norton
 // Modified by: Hiroyuki Nakamura(maloninc)
 // Created:     2006-01-10
-// RCS-ID:      $Id$
 // Copyright:   (c) Ryan Norton
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) Ryan Norton
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #if wxUSE_DIRDLG
 
 
 #if wxUSE_DIRDLG
 
+#include "wx/dirdlg.h"
+
 #ifndef WX_PRECOMP
     #include "wx/msgdlg.h"
     #include "wx/filedlg.h"
 #ifndef WX_PRECOMP
     #include "wx/msgdlg.h"
     #include "wx/filedlg.h"
-    #include "wx/dirdlg.h"
     #include "wx/app.h"
 #endif
 
 #include "wx/filename.h"
     #include "wx/app.h"
 #endif
 
 #include "wx/filename.h"
+#include "wx/modalhook.h"
 
 #include "wx/cocoa/autorelease.h"
 #include "wx/cocoa/string.h"
 
 #include "wx/cocoa/autorelease.h"
 #include "wx/cocoa/string.h"
@@ -55,7 +56,8 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message,
     wxTopLevelWindows.Append(this);
 
     m_message = message;
     wxTopLevelWindows.Append(this);
 
     m_message = message;
-    m_dialogStyle = style;
+
+    SetWindowStyle(style);
     m_parent = parent;
     m_path = defaultPath;
 
     m_parent = parent;
     m_path = defaultPath;
 
@@ -69,7 +71,7 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message,
 
     //If the user requests to save - use a NSSavePanel
     //else use a NSOpenPanel
 
     //If the user requests to save - use a NSSavePanel
     //else use a NSOpenPanel
-    if (m_dialogStyle & wxFD_SAVE)
+    if (HasFlag(wxFD_SAVE))
     {
         SetNSPanel([NSSavePanel savePanel]);
 
     {
         SetNSPanel([NSSavePanel savePanel]);
 
@@ -90,7 +92,7 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message,
         [GetNSSavePanel() setPrompt:@"Open"];
     }
 
         [GetNSSavePanel() setPrompt:@"Open"];
     }
 
-    if (m_dialogStyle & wxDD_NEW_DIR_BUTTON) //m_dialogStyle & wxDD_NEW_DIR_BUTTON
+    if (HasFlag(wxDD_NEW_DIR_BUTTON)) //m_dialogStyle & wxDD_NEW_DIR_BUTTON
     {
         [(NSOpenPanel*)m_cocoaNSWindow setCanCreateDirectories:YES];
     }
     {
         [(NSOpenPanel*)m_cocoaNSWindow setCanCreateDirectories:YES];
     }
@@ -102,13 +104,15 @@ wxDirDialog::~wxDirDialog()
 
 int wxDirDialog::ShowModal()
 {
 
 int wxDirDialog::ShowModal()
 {
+    WX_HOOK_MODAL_DIALOG();
+
     wxAutoNSAutoreleasePool thePool;
 
     m_fileNames.Empty();
 
     int nResult;
 
     wxAutoNSAutoreleasePool thePool;
 
     m_fileNames.Empty();
 
     int nResult;
 
-    if (m_dialogStyle & wxFD_SAVE)
+    if (HasFlag(wxFD_SAVE))
     {
         nResult = [GetNSSavePanel()
                     runModalForDirectory:wxNSStringWithWxString(m_dir)
     {
         nResult = [GetNSSavePanel()
                     runModalForDirectory:wxNSStringWithWxString(m_dir)