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/SPTextView.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/SPTextView.m')
-rw-r--r-- | Source/SPTextView.m | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m index e37b5939..970869c1 100644 --- a/Source/SPTextView.m +++ b/Source/SPTextView.m @@ -1844,8 +1844,11 @@ static inline NSPoint SPPointOnLine(NSPoint a, NSPoint b, CGFloat t) { return NS [theHintString replaceCharactersInRange:tagRange withString:cmdResult]; } else if([err code] != 9) { // Suppress an error message if command was killed NSString *errorMessage = [err localizedDescription]; - SPBeginAlertSheet(NSLocalizedString(@"BASH Error", @"bash error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [self window], self, nil, nil, - [NSString stringWithFormat:@"%@ “%@”:\n%@", NSLocalizedString(@"Error for", @"error for message"), [theHintString substringWithRange:cmdRange], errorMessage]); + SPOnewayAlertSheet( + NSLocalizedString(@"BASH Error", @"bash error"), + [self window], + [NSString stringWithFormat:NSLocalizedString(@"Error for “%1$@”:\n%2$@", @"error for bash command ($1), $2=message"), [theHintString substringWithRange:cmdRange], errorMessage] + ); } } else { [theHintString replaceCharactersInRange:tagRange withString:@""]; |