Improved open-dialog behavior in Cocoa
This commit is contained in:
parent
4904277f0d
commit
21b91adf6a
@ -53,11 +53,10 @@
|
|||||||
[_preferencesWindow makeKeyAndOrderFront:self];
|
[_preferencesWindow makeKeyAndOrderFront:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidBecomeActive:(NSNotification *)notification
|
- (BOOL)applicationOpenUntitledFile:(NSApplication *)sender
|
||||||
{
|
{
|
||||||
NSDocumentController *controller = [NSDocumentController sharedDocumentController];
|
|
||||||
if (![[controller documents] count]) {
|
|
||||||
[[NSDocumentController sharedDocumentController] openDocument:self];
|
[[NSDocumentController sharedDocumentController] openDocument:self];
|
||||||
}
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
Reference in New Issue
Block a user