diff options
author | Max <post@wickenrode.com> | 2015-10-20 15:24:10 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-10-20 15:24:10 +0200 |
commit | 5357fd1375d19a6c5de96293b3899f430422a3c0 (patch) | |
tree | 18c0ca79b6be40aecbd8200ceedd9111a346bb63 /Source/SPAlertSheets.m | |
parent | e12e3e86f26b47a51c10940bca1102326d47bf82 (diff) | |
download | sequelpro-5357fd1375d19a6c5de96293b3899f430422a3c0.tar.gz sequelpro-5357fd1375d19a6c5de96293b3899f430422a3c0.tar.bz2 sequelpro-5357fd1375d19a6c5de96293b3899f430422a3c0.zip |
Replace a lot of SPBeginAlertSheet()s with the more concise SPOnewayAlertSheet()
This should also eliminate a few use-after-free crashes
Diffstat (limited to 'Source/SPAlertSheets.m')
-rw-r--r-- | Source/SPAlertSheets.m | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/SPAlertSheets.m b/Source/SPAlertSheets.m index d19da6df..258aac6d 100644 --- a/Source/SPAlertSheets.m +++ b/Source/SPAlertSheets.m @@ -144,6 +144,17 @@ @end /** + * Shorthand for SPOnewayAlertSheetWithStyle() with defaultButton=nil and alertStyle=NSWarningAlertStyle + */ +void SPOnewayAlertSheet( + NSString *title, + NSWindow *docWindow, + NSString *msg) +{ + SPOnewayAlertSheetWithStyle(title, nil, docWindow, msg, NSWarningAlertStyle); +} + +/** * A Send-and-forget variant for displaying alerts. * It will queue the alert on the main thread and *always* immediately return. * Because of that there is no way to set a delegate and callback method @@ -151,7 +162,7 @@ * If nil is passed as the button title it will be changed to @"OK". * If nil is passed as the window NSAlert will be modal */ -void SPOnewayAlertSheet( +void SPOnewayAlertSheetWithStyle( NSString *title, NSString *defaultButton, NSWindow *docWindow, |