File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -129,11 +129,6 @@ - (void)applicationDidFinishLaunching:(NSNotification*)notification
129
129
130
130
if (![[NSApplication sharedApplication ] isActive ])
131
131
return ;
132
-
133
- // The current directory was not enabled or could not be opened (most likely it’s not a git repository).
134
- // show an open panel for the user to select a repository to view
135
- if ([PBGitDefaults showOpenPanelOnLaunch ] && !hasOpenedDocuments && cloneRepositoryPanel == nil )
136
- [[PBRepositoryDocumentController sharedDocumentController ] openDocument: self ];
137
132
}
138
133
139
134
- (void )getUrl : (NSAppleEventDescriptor *)event withReplyEvent : (NSAppleEventDescriptor *)replyEvent
@@ -405,6 +400,19 @@ - (void)applicationWillTerminate:(NSNotification *)aNotification
405
400
[[NSNotificationCenter defaultCenter ] removeObserver: self ];
406
401
}
407
402
403
+ - (BOOL )applicationShouldOpenUntitledFile : (NSApplication *)sender
404
+ {
405
+ id dc = [PBRepositoryDocumentController sharedDocumentController ];
406
+
407
+ // Reopen last document if user prefers
408
+ if ([PBGitDefaults showOpenPanelOnLaunch ])
409
+ {
410
+ [dc openDocument: self ];
411
+ }
412
+
413
+ return NO ;
414
+ }
415
+
408
416
/* *
409
417
Implementation of dealloc, to release the retained variables.
410
418
*/
You can’t perform that action at this time.
0 commit comments