Skip to content

Commit 0812581

Browse files
committed
Ensure proxy icon points to project, not .git dir
It's pretty rare you'd want to use the proxy icon to get to the .git directory seeing as all document interactions such as open occur at the higher level. (Bare repositories excepted.) This should address laullon#106
1 parent b547c26 commit 0812581

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

PBGitWindowController.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ - (id)initWithRepository:(PBGitRepository*)theRepository displayDefault:(BOOL)di
4242
return self;
4343
}
4444

45+
- (void)synchronizeWindowTitleWithDocumentName
46+
{
47+
[super synchronizeWindowTitleWithDocumentName];
48+
49+
// Point window proxy icon at project directory, not internal .git dir
50+
NSString *workingDirectory = [self.repository workingDirectory];
51+
[[self window] setRepresentedURL:[NSURL fileURLWithPath:workingDirectory
52+
isDirectory:YES]];
53+
}
54+
4555
- (void)windowWillClose:(NSNotification *)notification
4656
{
4757
//DLog(@"Window will close!");

0 commit comments

Comments
 (0)