diff --git a/PBGitSidebarController.m b/PBGitSidebarController.m index 6e5bd43..6fbf58c 100644 --- a/PBGitSidebarController.m +++ b/PBGitSidebarController.m @@ -69,6 +69,21 @@ [sourceView selectRow:index byExtendingSelection:NO]; } +#pragma mark NSOutlineView delegate methods + +- (void)outlineViewSelectionDidChange:(NSNotification *)notification +{ + NSInteger index = [sourceView selectedRow]; + PBSourceViewItem *item = [sourceView itemAtRow:index]; + + if ([item revSpecifier]) { + [[repository windowController] showHistoryView:self]; + repository.currentBranch = [item revSpecifier]; + return; + } + + /* Handle Remotes etc */ +} #pragma mark NSOutlineView delegate methods - (BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem:(id)item