Skip to content

Commit d2feedc

Browse files
committed
when opening a repository with the gitx command also activate GitX (pieter#4)
The commit 8c15c66 (Open repositories through AppleEvents.) changed the way the gitx command line tool opens repositories from NSWorkspace to AppleScript. It seems that using NSWorkspace is like actually »opening« the document/repository while the AppleScript implementation is like the AppleScript »open« command. This reestablishes the old behaviour by sending an activate command before opening the document.
1 parent 9a04471 commit d2feedc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Classes/gitx.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ void handleDiffWithArguments(NSURL *repositoryURL, NSArray *arguments)
117117
void handleOpenRepository(NSURL *repositoryURL, NSArray *arguments)
118118
{
119119
GitXApplication *gitXApp = [SBApplication applicationWithBundleIdentifier:kGitXBundleIdentifier];
120+
[gitXApp activate];
120121
[gitXApp open:repositoryURL withOptions:arguments];
121122
return;
122123
}

0 commit comments

Comments
 (0)