X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ba41a8c629381ebd8ce7c0f309dc3545df51c315..f941a30bef665561d96d29c4cee07471dbbd497f:/src/osx/cocoa/msgdlg.mm diff --git a/src/osx/cocoa/msgdlg.mm b/src/osx/cocoa/msgdlg.mm index d574137f1e..504e019070 100644 --- a/src/osx/cocoa/msgdlg.mm +++ b/src/osx/cocoa/msgdlg.mm @@ -133,7 +133,7 @@ int wxMessageDialog::ShowModal() else { NSAlert* alert = [[NSAlert alloc] init]; - + wxCFStringRef cfNoString( GetNoLabel(), GetFont().GetEncoding() ); wxCFStringRef cfYesString( GetYesLabel(), GetFont().GetEncoding() ); wxCFStringRef cfOKString( GetOKLabel(), GetFont().GetEncoding() ); @@ -144,7 +144,7 @@ int wxMessageDialog::ShowModal() [alert setMessageText:cfTitle.AsNSString()]; [alert setInformativeText:cfText.AsNSString()]; - + int buttonId[3] = { 0, 0, 0 }; int buttonCount = 0; @@ -186,29 +186,31 @@ int wxMessageDialog::ShowModal() wxNonOwnedWindow* parentWindow = NULL; int button = -1; - - if (GetParent()) + + if (GetParent()) { parentWindow = dynamic_cast(wxGetTopLevelParent(GetParent())); } - + + /* if (parentWindow) { NSWindow* nativeParent = parentWindow->GetWXWindow(); - ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; - [alert beginSheetModalForWindow: nativeParent modalDelegate: sheetDelegate - didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) + ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; + [alert beginSheetModalForWindow: nativeParent modalDelegate: sheetDelegate + didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) contextInfo: nil]; [sheetDelegate waitForSheetToFinish]; button = [sheetDelegate code]; [sheetDelegate release]; } else +*/ { button = [alert runModal]; } [alert release]; - + if ( button < NSAlertFirstButtonReturn ) resultbutton = wxID_CANCEL; else