From b08a9576ff733784de413538ae4caaf0b2cc8fdf Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Mon, 20 Jul 2020 23:11:19 -0400 Subject: [PATCH 1/2] Fix NSAlert appearing without a button. New behavior sets 'OK' if none are set. --- Source/NSAlert.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/NSAlert.m b/Source/NSAlert.m index 68bc15fb6..1b2a32b3e 100644 --- a/Source/NSAlert.m +++ b/Source/NSAlert.m @@ -2005,6 +2005,10 @@ void NSBeginInformationalAlertSheet(NSString *title, icon: _icon title: _message_text != nil ? _message_text : _(@"Alert") message: _informative_text != nil ? _informative_text : _(@"No information")]; + if ([_buttons count] == 0) + { + [self addButtonWithTitle: @"OK"]; + } [panel setButtons: _buttons]; } } From 80e6ad1758f7e472e2f72aa3e6270f129aff31f3 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Mon, 20 Jul 2020 23:12:50 -0400 Subject: [PATCH 2/2] Add changelog --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 033f6d31c..ec34a0d01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-07-20 Gregory John Casamento + + * Source/NSAlert.m: Fix NSAlert to have an OK button if none other + is specified. This appears to be the default behavior at this point + according to testing on macOS. + 2020-07-19 Gregory John Casamento * Headers/AppKit/AppKit.h: Add include files for NSSegue* and other