X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e031f1df56a1595c7ebb4027eb89bf1c9f286bdf..ae06f91bf1c13aeecaa326207268e05689c60043:/src/cocoa/dirdlg.mm diff --git a/src/cocoa/dirdlg.mm b/src/cocoa/dirdlg.mm index e434dc60ed..1c3c95d8a5 100644 --- a/src/cocoa/dirdlg.mm +++ b/src/cocoa/dirdlg.mm @@ -22,10 +22,11 @@ #if wxUSE_DIRDLG +#include "wx/dirdlg.h" + #ifndef WX_PRECOMP #include "wx/msgdlg.h" #include "wx/filedlg.h" - #include "wx/dirdlg.h" #include "wx/app.h" #endif @@ -55,7 +56,8 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, wxTopLevelWindows.Append(this); m_message = message; - m_dialogStyle = style; + + SetWindowStyle(style); 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 (m_dialogStyle & wxFD_SAVE) + if (HasFlag(wxFD_SAVE)) { SetNSPanel([NSSavePanel savePanel]); @@ -90,7 +92,7 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, [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]; } @@ -108,7 +110,7 @@ int wxDirDialog::ShowModal() int nResult; - if (m_dialogStyle & wxFD_SAVE) + if (HasFlag(wxFD_SAVE)) { nResult = [GetNSSavePanel() runModalForDirectory:wxNSStringWithWxString(m_dir)