Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions src/MacVim/MMVimController.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ @interface MMAlert : NSAlert {
}
- (void)setTextFieldString:(NSString *)textFieldString;
- (NSTextField *)textField;
- (void)beginSheetModalForWindow:(NSWindow *)window
modalDelegate:(id)delegate;
@end


Expand Down Expand Up @@ -1533,9 +1535,7 @@ - (void)handleShowDialog:(NSDictionary *)attr
}

[alert beginSheetModalForWindow:[windowController window]
modalDelegate:self
didEndSelector:@selector(alertDidEnd:code:context:)
contextInfo:NULL];
modalDelegate:self];

[alert release];
}
Expand Down Expand Up @@ -1602,13 +1602,19 @@ - (void)setInformativeText:(NSString *)text

- (void)beginSheetModalForWindow:(NSWindow *)window
modalDelegate:(id)delegate
didEndSelector:(SEL)didEndSelector
contextInfo:(void *)contextInfo
{

#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
[super beginSheetModalForWindow:window
completionHandler:^(NSModalResponse code) {
[delegate alertDidEnd:self code:code context:NULL];
}];
#else
[super beginSheetModalForWindow:window
modalDelegate:delegate
didEndSelector:didEndSelector
contextInfo:contextInfo];
didEndSelector:@selector(alertDidEnd:code:context:)
contextInfo:NULL];
#endif

// HACK! Place the input text field at the bottom of the informative text
// (which has been made a bit larger by adding newline characters).
Expand Down