Skip to content

Commit

Permalink
Launch julia on app reopen event
Browse files Browse the repository at this point in the history
  • Loading branch information
slarew authored and staticfloat committed Apr 16, 2019
1 parent 77885a1 commit 05c2ead
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions contrib/mac/frameworkapp/JuliaLauncher/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,17 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[self findJuliaWithSpotlight];
}

- (BOOL)applicationShouldHandleReopen:(NSApplication *)sender
hasVisibleWindows:(BOOL)flag {
if (!_mdq.gathering) {
NSURL *juliaexe = self.latestKnownTaggedJulia.juliaexe;
if (juliaexe) {
execJuliaInTerminal(juliaexe);
}
}
return NO;
}

- (void)addJuliaVariant:(JuliaVariant *)jv {
if ([self.juliaVariants objectForKey:jv.juliaexe]) {
// Don't overwrite.
Expand Down

0 comments on commit 05c2ead

Please sign in to comment.