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
129129
130130 if (![[NSApplication sharedApplication ] isActive ])
131131 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 ];
137132}
138133
139134- (void )getUrl : (NSAppleEventDescriptor *)event withReplyEvent : (NSAppleEventDescriptor *)replyEvent
@@ -405,6 +400,19 @@ - (void)applicationWillTerminate:(NSNotification *)aNotification
405400 [[NSNotificationCenter defaultCenter ] removeObserver: self ];
406401}
407402
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+
408416/* *
409417 Implementation of dealloc, to release the retained variables.
410418 */
You can’t perform that action at this time.
0 commit comments