Files
gitx/NSOutlineViewExt.m
Pieter de Bie 23d5c01a3d Sidebar: hook up branch switching
This is far from perfect, but at least you can
use it to navigate the stuff a bit now :)
2009-09-10 02:32:09 +02:00

26 lines
471 B
Objective-C

//
// NSOutlineViewExit.m
// GitX
//
// Created by Pieter de Bie on 9/9/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import "NSOutlineViewExt.h"
@implementation NSOutlineView (PBExpandParents)
- (void)PBExpandItem:(id)item expandParents:(BOOL)expand
{
NSMutableArray *parents = [NSMutableArray array];
while (item) {
[parents insertObject:item atIndex:0];
item = [item parent];
}
for (id p in parents)
[self expandItem:p];
}
@end