X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/899544330f37440c140b72a014c518a911b5b7a4..e45080c10b11190028e843b617564caec95e82dd:/src/mac/carbon/dirdlg.cpp?ds=inline diff --git a/src/mac/carbon/dirdlg.cpp b/src/mac/carbon/dirdlg.cpp index f63080f4e1..57e384eaff 100644 --- a/src/mac/carbon/dirdlg.cpp +++ b/src/mac/carbon/dirdlg.cpp @@ -77,16 +77,17 @@ wxDirDialog::wxDirDialog(wxWindow *parent, int wxDirDialog::ShowModal() { - NavDialogRef dialog; + NavDialogRef dialog = NULL; NavDialogCreationOptions options; NavReplyRecord reply ; bool disposeReply = false ; OSStatus err = noErr; err = NavGetDefaultDialogCreationOptions(&options); + options.optionFlags &= ~kNavAllowMultipleFiles; if (err == noErr) { - wxMacCFStringHolder message(m_message, m_font.GetEncoding()); + wxCFStringRef message(m_message, m_font.GetEncoding()); options.message = message; err = NavCreateChooseFolderDialog(&options, sStandardNavEventFilter , NULL, this , &dialog); if (err == noErr) @@ -135,6 +136,9 @@ int wxDirDialog::ShowModal() if ( err != noErr && err != userCanceledErr ) m_path = wxEmptyString ; + if ( dialog ) + ::NavDialogDispose(dialog); + return (err == noErr) ? wxID_OK : wxID_CANCEL ; }