mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-21 15:55:02 +00:00
Add delegate method to prevent automatically opening a new document on launch in document based applications.
Reviewed by me.
This commit is contained in:
1 parent
14528d5a49
commit
3060c3f100
1 file changed
+7
-2
@@ -268,8 +268,13 @@ CPRunContinuesResponse = -1002;
|
||||
[defaultCenter
|
||||
postNotificationName:CPApplicationWillFinishLaunchingNotification
|
||||
object:self];
|
||||
|
||||
if (_documentController)
|
||||
|
||||
var needsUntitled = !!_documentController;
|
||||
|
||||
if (needsUntitled && [_delegate respondsToSelector: @selector(applicationShouldOpenUntitledFile:)])
|
||||
needsUntitled = [_delegate applicationShouldOpenUntitledFile:self];
|
||||
|
||||
if (needsUntitled)
|
||||
[_documentController newDocument:self];
|
||||
|
||||
[defaultCenter
|
||||
|
||||
Reference in new issue
Block a user