File tree 3 files changed +26
-2
lines changed
3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -737,6 +737,10 @@ extern NSObject <SSYAlertErrorHideManager> * gSSYAlertErrorHideManager ;
737
737
*/
738
738
- (SSYAlertRecovery)alertError : (NSError *)error ;
739
739
740
+ - (void )alertError : (NSError *)error
741
+ onWindow : (NSWindow *)window
742
+ completionHandler : (void (^)(NSModalResponse returnCode))completionHandler ;
743
+
740
744
/* !
741
745
@brief Invokes -alertError: on the application's shared alert.
742
746
*/
Original file line number Diff line number Diff line change @@ -2077,6 +2077,26 @@ - (void)returnToScriptError:(NSError*)error {
2077
2077
[[NSScriptCommand currentCommand ] setScriptErrorString: [error localizedDescription ]] ;
2078
2078
}
2079
2079
2080
+ - (void )alertError: (NSError *)error
2081
+ onWindow: (NSWindow *)window
2082
+ completionHandler: (void (^)(NSModalResponse returnCode))completionHandler {
2083
+ if (!error) {
2084
+ return ;
2085
+ }
2086
+
2087
+ if ([gSSYAlertErrorHideManager shouldHideError: error]) {
2088
+ return ;
2089
+ }
2090
+
2091
+ if ([[error domain ] isEqualToString: NSCocoaErrorDomain ] && ([error code ] == NSUserCancelledError)) {
2092
+ return ;
2093
+ }
2094
+
2095
+ [self doLayoutError: error] ;
2096
+ [self runModalSheetOnWindow: window
2097
+ completionHandler: completionHandler] ;
2098
+ }
2099
+
2080
2100
- (void )alertError: (NSError *)error
2081
2101
onWindow: (NSWindow *)documentWindow_
2082
2102
modalDelegate: (id )modalDelegate
Original file line number Diff line number Diff line change @@ -114,9 +114,9 @@ - (BOOL)isRegex {
114
114
return isRegex ;
115
115
}
116
116
117
-
118
117
@end
119
118
119
+
120
120
@implementation SSYReplacePredicateEditorRowTemplate
121
121
122
122
/* Superclass NSPredicateEditorRowTemplate must conform to NSCopying because,
@@ -187,7 +187,7 @@ + (NSString*)anyEditableStringValueInView:(NSView*)view {
187
187
}
188
188
189
189
+ (NSString *)localizedRegexMenuItemTitle {
190
- return NSLocalizedString(@" Matches Regular Expression " , nil ) ;
190
+ return NSLocalizedString(@" matches regular expression " , nil ) ;
191
191
}
192
192
193
193
@end
You can’t perform that action at this time.
0 commit comments